Results 1 to 3 of 3

Thread: socket programming question ????

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2008
    Posts
    9

    socket programming question ????

    i have written a simple application which consists of a SERVER and

    CLIENT


    i wrote the CLIENT in JAVA

    SERVER IN VB

    i sent a string from the client but after the connection was established

    the string was blank when VB( using winsock control) displayed it , i sent a integer from client to SERVER(written in VB) i got some BOXES

    in the message box

    what should i do ???

  2. #2
    New Member
    Join Date
    Oct 2008
    Posts
    11

    Re: socket programming question ????

    Java sends and receives packets in bytes. So you need to send a byte array to the client containing your message. When you receive it will also be in bytes, You probably received a blank message box when receiving from the client because the first character was null or chr(0) in VB. So you will have to receive all the data in the a byte array, and simply convert it into a string, Then display.

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2008
    Posts
    9

    Re: socket programming question ????

    thanks a lot something the BYTE FORMATTING thing worked

Posting Permissions

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



Click Here to Expand Forum to Full Width