public Runnable accept(final DatagramSocket socket) throws IOException {
		if (socket == null) return null;

		byte [] buff = new byte[mBuffSize];
		final DatagramPacket pkt = new DatagramPacket(buff, buff.length);
		socket.receive(pkt);
		final Context ctx = new Context() {
				@Override public DatagramSocket getSocket() { return socket; }
				@Override public DatagramPacket getPacket() { return pkt; }
			};

		return new Runnable() {
			@Override public void run() {
				try {
					InputStream in = new ByteArrayInputStream(pkt.getData());
					HttpMessage.Input msg = HttpMessage.readMessage(in);
					
					HttpResponse.Input resp = HttpResponse.getByInput(msg);
					if (resp != null) {
						SsdpSearchResponse.Const ssresp = SsdpSearchResponse.getByHttpResponse(resp);
						if (ssresp != null) {
							performOnSearchResponse(ssresp, ctx);
							return;
						}
					}
					
					HttpRequest.Input req = HttpRequest.getByInput(msg);
					if (req != null) {
						
						SsdpAdvertisement.Const ssadv = SsdpAdvertisement.getByHttpRequest(req);
						if (ssadv != null) {
							performOnAdvertisement(ssadv, ctx);
							return;
						}

						SsdpSearchRequest.Const ssreq = SsdpSearchRequest.getByHttpRequest(req);
						if (ssreq != null) {
							performOnSearchRequest(ssreq, ctx);
							return;
						}
					}
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		};
	}