Socket in Applet



I am writing an Applet which contains a socket to connect back to the
server, accross the socket I will be sending vectors, from the server to the
Applet only. I have got the socket set up correctly but when I try the
following code the applet locks.

Socket connect = new Socket(<ip address>,<port number>);
ObjectInputStream socketIn;

BufferedInputStream b = new BufferedInputStrea (
connect.getInputStream());
socketIn = new ObjectInputStream(b); <--THIS LINE HERE

Could someone please explain what I need to do to set up the socket so I
ccan send objects over it. The server is running fine using the same code.

BTW the code is in the Applet's init() method.

Any help most welcome.


.



Relevant Pages

  • Need Desperate Help...Java Sockets
    ... I am trying to create a server and client to send files from one side ... public static final int BUFFER_SIZE = 4096; ... Socket socket; ... BufferedInputStream ins = new BufferedInputStream; ...
    (comp.lang.java)
  • Need Desperate Help...Java Sockets
    ... I am trying to create a server and client to send files from one side ... public static final int BUFFER_SIZE = 4096; ... Socket socket; ... BufferedInputStream ins = new BufferedInputStream; ...
    (comp.lang.java.programmer)
  • Re: How to terminate a socket in CLOSE_WAIT state
    ... FTP Server fixed for certain FTP clients who use both passive ... This was causing a PASSIVE opened socket to be left ... but instead expect the "half close" from the receiver. ... this sends a TCP/IP FIN packet to the ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Socket switch delay
    ... both at the client and at the server (and why ... would you set the send buffer size to zero on a non-overlapped ... One glaring error is your client does ... So when you use a single socket, ...
    (microsoft.public.win32.programmer.networks)
  • Re: Applet Hangs when submitting data to servlet
    ... to put a time limit on my socket connections and socket reads. ... public void setTimeoutthrows UnknownHostException, ... on our web server. ... private JButton theSubmitButton_, theClearButton_; ...
    (comp.lang.java.programmer)