diff --git a/.DS_Store b/.DS_Store
index e11c0d5..ea5ac09 100644
--- a/.DS_Store
+++ b/.DS_Store
Binary files differ
diff --git a/java/JavaPlugin.jar b/java/JavaPlugin.jar
new file mode 100644
index 0000000..8fa1090
--- /dev/null
+++ b/java/JavaPlugin.jar
Binary files differ
diff --git a/java/JavaSocketBridge.java b/java/JavaSocketBridge.java
index a8f064d..cb79354 100644
--- a/java/JavaSocketBridge.java
+++ b/java/JavaSocketBridge.java
@@ -5,127 +5,480 @@
 import javax.swing.*;
 import netscape.javascript.*;
 
+import java.lang.reflect.InvocationTargetException;
 import java.net.*;
+import java.nio.ByteBuffer;
+import java.nio.channels.ClosedChannelException;
+import java.nio.channels.DatagramChannel;
+import java.nio.channels.SelectionKey;
+import java.nio.channels.Selector;
+import java.nio.channels.ServerSocketChannel;
+import java.nio.channels.SocketChannel;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.Timer;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicInteger;
 import java.io.*;
 
+
+
 public class JavaSocketBridge extends JApplet {
 
-	private final static int PACKETSIZE = 3000 ;
+	static String protocol = "TCP";
+
+	static volatile Hashtable<String, SocketChannel> connections = new Hashtable<String, SocketChannel>();
+
+
+
+	volatile String result = "";
+
+	//static ConcurrentHashMap hm = null;
+	static boolean isBrowser = true;
+
+
+
+
+	private final static int PACKETSIZE = 2000 ;
 	// Instance variables
 	static JSObject browser = null;		// The browser
 
-	static ConcurrentHashMap hm = null;
+	protected Selector _ncReadSelector = null;
+	protected Selector _ncWriteSelector = null;		
 
-	// Initialize
+
+	// Initialize automatically called by browser
 	public void init(){
-		browser = JSObject.getWindow(this);
+
+		try{
+			browser = JSObject.getWindow(this);
+		}
+		catch(Exception e){
+			error( "ERROR IN INIT" + e.toString());
+		}
 	}
 
-	public String connectAndStart(final String ip, final int por, final String interest){
+	//start automatically called by browser
+	public void start(){
+		try {
+			browser.call("java_socket_bridge_ready", null);
+		} catch (Exception e) {
+			// TODO Auto-generated catch block
+			error("ERROR IN START" +e.toString());
+		}
+
+	}
+
+	public String getOLD(final String h, final int p, final String interest, final int timeout){
 		return AccessController.doPrivileged(
 				new PrivilegedAction<String>() {
 					public String run() {
 
-						DatagramSocket socket = null ;
-						byte[] output = null;
-						try
-						{
-							// Convert the arguments first, to ensure that they are valid
-							InetAddress host = InetAddress.getByName( ip ) ;
-							int port = por ;
+						Socket sock=null;
+						OutputStream out=null;
+						InputStream in=null;
 
-							// Construct the socket
-							socket = new DatagramSocket() ;
+						try{	
 
 
-							byte [] data = hex2Byte(interest);
-							DatagramPacket packet = new DatagramPacket( data, data.length, host, port ) ;
+							sock=new Socket(h,p);
 
-							// Send it
-							socket.send( packet ) ;
 
-							// Set a receive timeout, 2000 milliseconds
-							socket.setSoTimeout( 4000 ) ;
+							String word= interest;
 
-							// Prepare the packet for receive
-							packet.setData( new byte[PACKETSIZE] ) ;
 
-							// Wait for a response from the server
-							socket.receive( packet ) ;
+							in = sock.getInputStream();
 
-							// Print the response
-							output = packet.getData() ;
+							out=sock.getOutputStream();
 
-						}
-						catch( Exception e )
-						{
-							error(e.toString());
-							System.out.println( e ) ;
-						}
-						finally
-						{
-							if( socket != null )
-								socket.close() ;
+
+							System.out.println("Your string is"+word);
+
+							out.write(hex2Bytes(word));
+							out.flush();
+							sock.shutdownOutput();
+
+							ByteArrayOutputStream serverinput=new ByteArrayOutputStream();
+
+							int len=0;
+							byte[] buf=new byte[PACKETSIZE];
+							while ((len = in.read(buf))>=0) {
+								serverinput.write(buf, 0, len);
+							}
+
+							String outputString = bytes2Hex(buf);
+
+							System.out.println("Your string is "+word+" converted to byte "+outputString);
+
+							return outputString;
+
+						} catch (Exception e) {
+							// TODO Auto-generated catch block
+							error(e);
 						}
 
-						if(output!=null)
-							return byte2hex(output);
-						else 
-							return "";
+
+						finally{
+
+							try {
+								sock.close();
+							} catch (IOException e) {
+								// TODO Auto-generated catch block
+								error(e);
+							}
+
+						}
+
+						return "ERROR";
 					}
 				}
+
 				);
+	}
+
+	public String get(final String h, final int p, final String interest,final int timeout){
+		return AccessController.doPrivileged(
+				new PrivilegedAction<String>() {
+					public String run() {
+						Thread t = new Thread( new Runnable(){
+							public void run(){
+
+								SocketChannel sChannelCloser = null;
+								try{	
+
+									final SocketChannel sChannel = open(h,p);
+
+									sChannelCloser=sChannel;
+
+									sChannel.socket().setSoTimeout(timeout);
+
+									ByteBuffer buffer = ByteBuffer.wrap(hex2Bytes(interest));
+
+									System.out.println("WRITING  BYTES:"+interest);
+
+									while(buffer.hasRemaining())  
+										sChannel.write(buffer);
+
+									ByteBuffer bufferReceiver = ByteBuffer.allocate(PACKETSIZE);
+
+									buffer.clear();  
+									sChannel.read(bufferReceiver);
+
+									String output =  bytes2Hex(bufferReceiver.array());
+									System.out.println("RECEIVED BYTES:" +output);
+
+									result=output;
+
+									return ;
+
+								} catch (Exception e) {
+									// TODO Auto-generated catch block
+									error(e);
+								}
+								finally{
+
+									try {
+										sChannelCloser.close();
+									} catch (IOException e) {
+										// TODO Auto-generated catch block
+										error(e);
+									}
+
+								}
+
+
+
+								//return "STARTED GETTING";
+
+							}
+						}
+
+								);
+
+						t.start();
+
+						Long start = System.currentTimeMillis();
+						Long current = System.currentTimeMillis();
+
+						while(t.isAlive() && current-start < timeout ){
+							try {
+								Thread.sleep(100);
+							} catch (InterruptedException e) {
+								error(e);
+							}
+							current = System.currentTimeMillis();
+						}
+						if(current-start >= timeout){
+							t.stop();
+							return "TIMEOUT EXPIRED";
+						}
+						else{
+							return result;
+
+						}
+
+
+					}
+				}
+
+				);
+	}
+
+
+	// Report an error
+	public static void receivedInterest( String data,String name){
+
+		Object[] arguments = new Object[2];
+		arguments[0] = data;
+		arguments[1] = name;
+
+
+		try {
+			browser.call("on_socket_received_interest", arguments);
+		} catch (JSException e) {
+			// TODO Auto-generated catch block
+			error(e.getMessage());
+		}
 
 	}
 
-	public String sendContentObject(final String ip, final int por, final String interest){
+	public String put(final String h, final int p, final String interest,final String name, final String toReturn){
 		return AccessController.doPrivileged(
 				new PrivilegedAction<String>() {
 					public String run() {
 
-						DatagramSocket socket = null ;
-						byte[] output = null;
-						try
-						{
-							// Convert the arguments first, to ensure that they are valid
-							InetAddress host = InetAddress.getByName( ip ) ;
-							int port = por ;
 
-							// Construct the socket
-							socket = new DatagramSocket() ;
+						SocketChannel sChannelCloser = null;
+						try{	
+
+							final SocketChannel sChannel = open(h,p);
+							sChannelCloser=sChannel;
+
+							//FIRST TIME
+							//ByteBuffer buffer = ByteBuffer.allocateDirect(1024);
+
+							ByteBuffer buffer = ByteBuffer.wrap(hex2Bytes(interest));
+
+							System.out.println("WRITING  BYTES:"+interest);
+							while(buffer.hasRemaining())  
+								sChannel.write(buffer);
+
+							ByteBuffer bufferReceiver = ByteBuffer.allocate(PACKETSIZE);
+
+							buffer.clear();  
+							sChannel.read(bufferReceiver);
+
+							System.out.println("RECEIVED BYTES:" + bytes2Hex(bufferReceiver.array()));
 
 
-							byte [] data = hex2Byte(interest);
-							DatagramPacket packet = new DatagramPacket( data, data.length, host, port ) ;
 
-							// Send it
-							socket.send( packet );
+
+							Thread t = new Thread( new Runnable(){
+								public void run(){
+									//sChannel.
+									while(true){
+
+										try{
+
+											ByteBuffer bufferReceiver = ByteBuffer.allocate(PACKETSIZE);
+
+											bufferReceiver.clear();  
+											sChannel.read(bufferReceiver);
+
+											String receivedHexBytes = bytes2Hex(bufferReceiver.array());
+											
+											System.out.println("RECEIVED BYTES:" + receivedHexBytes);
+
+
+											System.out.println("name is "+name);
+
+											//connections.put(name, sChannel);
+
+											//System.out.println("name is "+name);
+
+											//receivedInterest(receivedHexBytes,name);
+
+
+											//byte[] output = hex2Bytes("048202aa03b208855dea25cca4d3967c774cc6e709a140d91f9d74e97a665cbb106568ee94f998d8b22fbe2b8d2fc43bd9363b501a50f2d770a7882aaf0792c20359f54da27d4a5b5a29be7d349c656e60fd37c92cf4e4aae256af04161e561aa4323512b38799c43d7a2ec4e35c3e19599b12c5ee3a5f0994837461c05c294a8b596f960e9287520000f2faad726f63636f000001a203e2028548398bad0eeb58e9cc64720e84f4947fe1c1eb310055181ed0b4c2d920ef6e590002bab504fcc5336e9c0001e201da0a9530819f300d06092a864886f70d010101050003818d003081890281810092e67426906bae66a3f4910bade5a2d24e2b7ed0d7a3e16f368c258e848f30115f6e95f5e0ee64505ed3da08be6ee599d395f611ffb096a9c258171518f0c6b3612a94681d29e44619227ac268e5d450abac89820d96188f507d15fb40d8780ccb76a012f7ce4f4efe2b8ba431ef993e31da867adffb069003808bceef9ff4d10203010001000000019abd424f4e4a4f55520000"); 
+
+											byte[] output = hex2Bytes(toReturn); 
+
+
+											ByteBuffer outputBuffer = ByteBuffer.wrap(output);
+
+											//byte[] output = hex2Bytes("048202aa03b208857d7f003e50fc79aca1563842832db26c5e313bec0940ce795dd8adc34e7fd2cadee7b44b28737d59c061240da60d0733e2bcc760c7656a0f03b20a987c1a1fb94bb93648243c48fde222bc21b85062f186ffdc15f637cfe83f35ab11e3564e7e83a26de39a0faf3991f469f0f376fca535fb1be28ede72b433547b4977f0f3000000f2faa574657374000001a203e20285189f9df9814d134883758f9c5541ba957a4464d8756f34870cf981143f56779a0002bab504fcbf24f6f60001e201da0a9530819f300d06092a864886f70d010101050003818d0030818902818100c0a2c68770c339ed3152b90cde701ba588652f358854460b36b866c6e76272013232df351f10841ac49e35a6bc644f9c9caacd9aa0cd0e1835a34162c9208049d3f1f893d0b9566854133a763756df45297328d595ba6b6459fd311d5e1c97ce5278fa076dde765090c7221670ad54689958cc5fb46699482c5ac16c301dba1f0203010001000000019abd424f4e4a4f55520000"); 
+
+											while(outputBuffer.hasRemaining())  
+												sChannel.write(outputBuffer);
+
+											System.out.println("SENT BACK SOME DATA");
+
+
+										}
+										catch(Exception e){
+											error(e);
+											try {
+												sChannel.close();
+											} catch (IOException e1) {
+												// TODO Auto-generated catch block
+												error(e1);
+											}
+											System.exit(0);
+
+										}
+									}
+
+								}});
+
+							t.start();
+
+							return "STARTED PUBLISHING";
+
+							//return receivedHexBytes;
+
+						} catch (Exception e) {
+							// TODO Auto-generated catch block
+							error(e);
+
+							try {
+								System.out.println("CLOSING THE CONNECTION");
+								sChannelCloser.close();
+							} catch (IOException ex) {
+								// TODO Auto-generated catch block
+								error(ex);
+
+							}
 						}
-						catch( Exception e )
-						{
-							error(e.toString());
-							System.out.println( e ) ;
-						}
-						finally
-						{
-							if( socket != null )
-								socket.close() ;
-						}
+						return "FAILURE";
 
-						if(output!=null)
-							return byte2hex(output);
-						else 
-							return "";
+
+
 					}
 				}
 				);
+	}
+
+
+
+	public String putAnswer(final String s, final String dataBack){
+
+		final SocketChannel sChannel = connections.get(s);
+
+
+		byte[] output = hex2Bytes(dataBack);
+
+		ByteBuffer outputBuffer = ByteBuffer.wrap(output);
+
+		//byte[] output = hex2Bytes("048202aa03b208857d7f003e50fc79aca1563842832db26c5e313bec0940ce795dd8adc34e7fd2cadee7b44b28737d59c061240da60d0733e2bcc760c7656a0f03b20a987c1a1fb94bb93648243c48fde222bc21b85062f186ffdc15f637cfe83f35ab11e3564e7e83a26de39a0faf3991f469f0f376fca535fb1be28ede72b433547b4977f0f3000000f2faa574657374000001a203e20285189f9df9814d134883758f9c5541ba957a4464d8756f34870cf981143f56779a0002bab504fcbf24f6f60001e201da0a9530819f300d06092a864886f70d010101050003818d0030818902818100c0a2c68770c339ed3152b90cde701ba588652f358854460b36b866c6e76272013232df351f10841ac49e35a6bc644f9c9caacd9aa0cd0e1835a34162c9208049d3f1f893d0b9566854133a763756df45297328d595ba6b6459fd311d5e1c97ce5278fa076dde765090c7221670ad54689958cc5fb46699482c5ac16c301dba1f0203010001000000019abd424f4e4a4f55520000"); 
+
+
+
+		try{
+			while(outputBuffer.hasRemaining())  
+				sChannel.write(outputBuffer);
+
+
+			ByteBuffer bufferReceiver = ByteBuffer.allocate(PACKETSIZE);
+
+			bufferReceiver.clear();  
+			sChannel.read(bufferReceiver);
+
+			String receivedHexBytes = bytes2Hex(bufferReceiver.array());
+			System.out.println("RECEIVED BYTES:" + receivedHexBytes);
+
+
+			receivedInterest(receivedHexBytes,s);
+
+		}
+		catch (Exception e) {
+			// TODO Auto-generated catch block
+			error(e);
+
+			try {
+				System.out.println("CLOSING THE CONNECTION");
+				sChannel.close();
+			} catch (IOException ex) {
+				// TODO Auto-generated catch block
+				error(ex);
+				return "FAILURE";
+			}
+		}
+
+		return "SUCCESS";
 
 	}
 
-	public static byte[] hex2Byte(String str)
+
+	public SocketChannel open(String host, int ip) throws IOException{
+		// Create a non-blocking socket channel
+		SocketChannel sChannel = SocketChannel.open();
+
+		//sChannel.configureBlocking(false);
+
+		// Send a connection request to the server; this method is non-blocking
+		sChannel.connect(new InetSocketAddress(host, ip));
+
+		// Before the socket is usable, the connection must be completed
+		// by calling finishConnect(), which is non-blocking
+
+		_ncReadSelector = Selector.open();
+		//sChannel.configureBlocking(false);
+		//sChannel.register(_ncReadSelector, SelectionKey.OP_READ);
+		_ncWriteSelector = Selector.open();
+		//sChannel.register(_ncWriteSelector, SelectionKey.OP_WRITE);
+
+
+		while (!sChannel.finishConnect()) {
+			// Do something else
+			System.out.println("TRYING TO CONNECT");
+		}
+		System.out.println("CONNECTED TO " +host +":"+ip);
+
+		return sChannel;
+	}
+
+
+	public static void error(Exception ex){
+		StringWriter sw = new StringWriter();
+		ex.printStackTrace(new PrintWriter(sw));
+		String exceptionAsStrting = sw.toString();
+
+		error(exceptionAsStrting );
+	}
+	// Report an error
+	public static void error(String message){
+
+		System.out.println("RECEIVED AN ERROR");
+		message = "Java Socket Bridge ERROR: " + message;
+		Object[] arguments = new Object[1];
+		arguments[0] = message;
+
+		if(isBrowser){
+			try {
+				browser.call("on_socket_error", arguments);
+			} catch (JSException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+		}
+		else{
+			System.out.println(message);
+		}
+	}
+
+
+
+
+	// Log something
+	public void log(String message){
+		System.out.println(message);
+	}
+
+
+	public static byte[] hex2Bytes(String str)
 	{
 		byte[] bytes = new byte[str.length() / 2];
 		for (int i = 0; i < bytes.length; i++)
@@ -136,7 +489,7 @@
 
 		return bytes;
 	}
-	public static String byte2hex(byte[] b)
+	public static String bytes2Hex(byte[] b)
 	{
 		// String Buffer can be used instead
 		String hs = "";
@@ -165,114 +518,38 @@
 	}
 
 
-	// Main
-	// Note: This method loops over and over to handle requests becuase only
-	//       this thread gets the elevated security policy.  Java == stupid.
-	public void start(){
-		try {
-			browser.call("java_socket_bridge_ready", null);
-		} catch (JSException e) {
-			// TODO Auto-generated catch block
-			error(e.getMessage());
-		}
+	public static void main(String[] args) throws IOException {
 
-	}
+		JavaSocketBridge b = new JavaSocketBridge();
+
+		//System.out.println( b.get("127.0.0.1",9695 ,"01D2F2FAA4657374000000", 1000));
+
+		//System.out.println( b.get("127.0.0.1",9695 ,"01D2F2FAA574657374000000", 1000));
+
+		//System.out.println( b.putSend("127.0.0.1",9695 ,"01d2f2faa563636e7800fa0285e0a01e093968f9740ce7f4361babf5bb05a4e55aaca5e58f73eddeb8e013aa8f00fabd73656c6672656700fa1bf5048202aa03b2088568cf069cdfdedad97ad9358f7e2446ca581eaa22ed9eb4e482fe616b35840533ba4f9d321155d6c34915dff7352de5e60bddb17e32f893cd89056cfd291011a5c3742312a083c2628fed4ddffb04cf51e6860eb1dbd43ff9b59736e62ec1a69218ce0acfdd9da896a617f609c12225f14a63876488b38d3a7b9fc1757d9058470000f20001a203e2028547ab87ece0e191c5e946f839507bc875c63c7032e42c347c135a952e7187c9300002bab504fcb2a6a0250001e201da0a9530819f300d06092a864886f70d010101050003818d003081890281810089b8f8b42d8aa31148d9f2a0c38d3fee7c73f60ea444d08fd886114a689cfe235c49bf9e256489390c19d961aabd5ee6d9e9e133282cd68b046609fe0a81be76c683cb150f3d035231b25745530fc887fbd137d6ef9c05d795fdb78f84eeab6f7dcbd1aa64b3920d96cfe941b66967bb2892baef1995bea231a4dc89c383e8550203010001000000019a0585058a04cabe73656c6672656700f2faad726f63636f000003e20285e0a01e093968f9740ce7f4361babf5bb05a4e55aaca5e58f73eddeb8e013aa8f0004fa8e330003d2d63231343734383336343700000000000002d28e310000",1000));
+
+		//System.out.println( b.putSend("127.0.0.1",9695 ,"01D2F2FAA574657374000000",1000));
 
 
-	// Report an error
-	public static void error(String message){
-		message = "Java Socket Bridge ERROR: " + message;
-		Object[] arguments = new Object[1];
-		arguments[0] = message;
-		try {
-			browser.call("on_socket_error", arguments);
-		} catch (JSException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-	}
+		//System.out.println( b.getSend("127.0.0.1",9695 ,"01D2F2FAA574657374000000", 1000));
 
-	// Report an error
-	public static void receivedInterest(String IP,int port, byte[] data){
+		//System.out.println( b.get("localhost",9695 ,"01d2f2fafd",3000));
+
+		//System.out.println( b.get("localhost",9695 ,"01D2F2FAA574657374000",3000));
 
 
-		Object[] arguments = new Object[3];
-		arguments[0] = IP;
-		arguments[1] = port;
-		arguments[2] = byte2hex( data );
-
-		try {
-			browser.call("on_socket_received_interest", arguments);
-		} catch (JSException e) {
-			// TODO Auto-generated catch block
-			error(e.getMessage());
-		}
-
-	}
+		//System.out.println( b.getOLD("localhost",9695 ,"01d2f2fafdc12e4d2e532e6c6f63616c686f737400fabdc12e4d2e53525600faa563636e6400fa9d4b4559000002d28e310000",1000));
 
 
-	public static void connectAndStartAndPublish() 
-	{
+		//System.out.println( b.putSend("localhost",9695 ,"01d2f2faa563636e7800fa0285e0a01e093968f9740ce7f4361babf5bb05a4e55aaca5e58f73eddeb8e013aa8f00fabd73656c6672656700fa1bf5048202aa03b208854a18988c72aee624da28e2e1acbccb209b8e89429041985521ed68f95a1c546872fba3d854b1377dc249b6d8ec5935e5069256c97a7f6d8a62e86222ccd2cfe5097aed3fe5ede6732ce191a8680d78e39d0c5058a2b7bb0f0687994e9f045de346b66c46498547a08da1f2f0cdfafba3afdfe7107931935ede79040137ba94a90000f20001a203e202851a4860caa4991e829bcdc9429fb711d52440968d23560726606050bf147acffc0002bab504fcb3f03aa40001e201da0a9530819f300d06092a864886f70d010101050003818d00308189028181008ed27580e3d1c4c67672208665133a1ba12d8ebf5cad8e054571926b3ff0782a04c71703384021a6cefb6616b66cbd8a679b761d69d6373a851546e26f7105510b4c23be9a3c7f2e652e100ecc1471855730659f1477ce4e8504ad1fd8f44116baaeae2ff67eec33abba790157a79bf5039e5a528a471d9d67c94e70117ed7490203010001000000019a0585058a04cabe73656c6672656700f2faad726f63636f000003e20285e0a01e093968f9740ce7f4361babf5bb05a4e55aaca5e58f73eddeb8e013aa8f0004fa8e330003d2d63231343734383336343700000000000002d28e310000", 1000));
 
-		AccessController.doPrivileged(
-				new PrivilegedAction<String>() {
-					public String run() {
-						Thread t = new Thread( new Runnable(){
-							public void run(){
+		//b.putSend("localhost",9695 ,"01d2f2faa563636e7800fa0285e0a01e093968f9740ce7f4361babf5bb05a4e55aaca5e58f73eddeb8e013aa8f00fabd73656c6672656700fa1bf5048202aa03b208854a18988c72aee624da28e2e1acbccb209b8e89429041985521ed68f95a1c546872fba3d854b1377dc249b6d8ec5935e5069256c97a7f6d8a62e86222ccd2cfe5097aed3fe5ede6732ce191a8680d78e39d0c5058a2b7bb0f0687994e9f045de346b66c46498547a08da1f2f0cdfafba3afdfe7107931935ede79040137ba94a90000f20001a203e202851a4860caa4991e829bcdc9429fb711d52440968d23560726606050bf147acffc0002bab504fcb3f03aa40001e201da0a9530819f300d06092a864886f70d010101050003818d00308189028181008ed27580e3d1c4c67672208665133a1ba12d8ebf5cad8e054571926b3ff0782a04c71703384021a6cefb6616b66cbd8a679b761d69d6373a851546e26f7105510b4c23be9a3c7f2e652e100ecc1471855730659f1477ce4e8504ad1fd8f44116baaeae2ff67eec33abba790157a79bf5039e5a528a471d9d67c94e70117ed7490203010001000000019a0585058a04cabe73656c6672656700f2faad726f63636f000003e20285e0a01e093968f9740ce7f4361babf5bb05a4e55aaca5e58f73eddeb8e013aa8f0004fa8e330003d2d63231343734383336343700000000000002d28e310000", 1000);
 
+		//NewTest(54567);
 
-								String message; 
-								try{
-									DatagramSocket serverSocket = new DatagramSocket(9876);
-									byte[] receiveData = new byte[1024];
-									byte[] sendData = new byte[1024];
-									while(true)
-									{
-										DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);
-										serverSocket.receive(receivePacket);
+		//System.out.println( b.put());
 
-										//String sentence = new String( receivePacket.getData());
-
-										//System.out.println("RECEIVED: " + sentence);
-
-
-										InetAddress IPAddress = receivePacket.getAddress();
-
-										int port = receivePacket.getPort();
-
-										byte[] receivedData = receivePacket.getData();
-
-										receivedInterest( IPAddress.getHostAddress() , port, receivedData);
-
-										//String capitalizedSentence = sentence.toUpperCase();
-
-										//DATA PACKET HERE!
-
-
-										//sendData = capitalizedSentence.getBytes();
-
-										//DatagramPacket sendPacket =
-										//	new DatagramPacket(sendData, sendData.length, IPAddress, port);
-										//serverSocket.send(sendPacket);
-									}
-								}
-								catch(Exception e){
-									error("Exception " + e + "FAILURE, ERROR IN SOCKET CONECTION");
-								}
-
-
-							}
-						});
-
-						t.start();
-						return "SUCCESS";
-
-
-					}
-
-
-				}
-				);
+		//connections.put("meki", SocketChannel.open());
 
 	}
 
