Results 1 to 5 of 5

Thread: How to send message using Winsock...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2006
    Location
    UAE
    Posts
    191

    How to send message using Winsock...

    Hello friends I am trying to send message through winsock...
    I think my client side code is ready but I dont know How to receive messsage through winsock..
    And plz give me little info about port also
    Thank you very much.....

  2. #2
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: How to send message using Winsock...

    Look for the _DataArrival event

    use Code like this:
    Code:
    Private Sub WinSockTCP_DataArrival( ByVal bytesTotal As Long)
        Stream = ""
        WinSockTCP(Index).GetData Message
        'Message (a String) is holding your message now
    
    End Sub
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2006
    Location
    UAE
    Posts
    191

    Re: How to send message using Winsock...

    Hey but it is not going to connect.....For data arrival..
    How can i check whether it is conncected or not...
    Can you send all the steps for sending data plz...
    Thanx

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jun 2006
    Location
    UAE
    Posts
    191

    Re: How to send message using Winsock...

    Whenever I start listen method its state is not changing frm 6(connecting state)
    So I cant do any think but connecting

  5. #5
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: How to send message using Winsock...

    The Server should .Listen, then the client is doing the .Connect, this message will raise the ConnectionRequest_Event by the server, who should .Accept the connection. Now the clinet will change it's state to 7 (connected).
    And then you can send from either side!
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

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