Results 1 to 4 of 4
  1. #1
    ketan is offline Member
    Join Date
    Sep 2011
    Posts
    12
    Rep Power
    0

    Default need to send diifreent type of data through sockets

    I need to send data of different data types from client to server via socket,,,, i have found that i need to convert data firstly in to byte[] type before sending it and at server reconvert the same ,,, please suggest me some other way out.

    Thanks in Advance!

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default Re: need to send diifreent type of data through sockets


  3. #3
    ketan is offline Member
    Join Date
    Sep 2011
    Posts
    12
    Rep Power
    0

    Default Re: need to send diifreent type of data through sockets

    hi,
    actually m sending file and then function arguments through same socket connection but in diffrent output streams.( Sending file by fileoutoutstream and arguments by dataoutputstream),,,, but at client end both type of data is being collected in same fileinputstream only and m getting EOFexception ,,, please suggest me how can i resolve this???? Thanks!

  4. #4
    ketan is offline Member
    Join Date
    Sep 2011
    Posts
    12
    Rep Power
    0

    Default Re: need to send diifreent type of data through sockets

    its done, using ObjectOutputStream class,,,, Thanks a lot :)

Similar Threads

  1. Website to pull data from java sockets?
    By josephjah in forum Advanced Java
    Replies: 2
    Last Post: 07-24-2011, 07:24 AM
  2. Data loss when using sockets
    By Bear in forum Networking
    Replies: 11
    Last Post: 07-07-2011, 07:08 PM
  3. Replies: 1
    Last Post: 01-09-2010, 02:16 PM
  4. how to send any file size using sockets
    By amjad.88 in forum Networking
    Replies: 12
    Last Post: 03-14-2009, 06:46 AM
  5. how to send files through sockets
    By gabriel in forum Advanced Java
    Replies: 3
    Last Post: 01-12-2008, 08:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •