QuickServer
v1.4.1

org.quickserver.net.server
Interface ClientBinaryHandler


public interface ClientBinaryHandler

This interface defines the methods that should be implemented by any class that wants to handle java Objects from a client.

Recommendations to be followed when implementing ClientBinaryHandler

Ex:

 package dateserver;
 
 import java.net.*;
 import java.io.*;
 import java.util.Date;
 import org.quickserver.net.server.*;
 
 public class BinaryHandler implements ClientBinaryHandler {
 
         public void handleBinary(ClientHandler handler, byte command[]))
                         throws SocketTimeoutException, IOException {
                 handler.sendSystemMsg("Got Binary : " + new String(command));
         }
 }
 

Since:
1.4
Author:
Akshathkumar Shetty

Method Summary
 void handleBinary(ClientHandler handler, byte[] command)
          Method called every time client sends an binary data.
 

Method Detail

handleBinary

public void handleBinary(ClientHandler handler,
                         byte[] command)
                  throws java.net.SocketTimeoutException,
                         java.io.IOException
Method called every time client sends an binary data. Should be used to handle the binary data sent.

Throws:
java.net.SocketTimeoutException - if socket times out
java.io.IOException - if io error in socket

QuickServer
v1.4.1

Copyright © 2003-2004 QuickServer.org