Results 1 to 4 of 4

Thread: No DataArrival?

Threaded View

  1. #1

    Thread Starter
    New Member MyTHoS_'s Avatar
    Join Date
    Feb 2006
    Location
    Everywhere!
    Posts
    5

    Unhappy No DataArrival?

    Hi i am new to visual basic..I have some knowledge about the winsocks in vbasic and i have succesfully made a chat program..Why am i saying all this?
    Because i can't explain the problem i have..Ok here goes:
    I have made a winsocket that listens to a specific port.The client can succesfully connect and i can see that when i accept the connection request..But when i try to receive the data the client sends i receive nothing, that is the DataArrival is never called..Here is the code part.I can't figure out what's the problem because i use the same code i used in my chat program

    VB Code:
    1. Winsock23.LocalPort = 23
    2. Winsock23.Listen
    3.  
    4. Private Sub Winsock23_ConnectionRequest(ByVal requestID As Long)
    5.  
    6. On Error Resume Next
    7.  
    8. 'Now accept the Request
    9.  
    10. Winsock23.Accept requestID
    11. txtEvent.Text = txtEvent.Text & vbCrLf & " connected"
    12. End Sub
    13.  
    14.  
    15.  
    16. Private Sub Winsock23_DataArrival(ByVal bytesTotal As Long)
    17. Dim str As String
    18. MsgBox str
    19.  
    20. Winsock23.GetData str, vbString
    21. End Sub

    The msbox should at least display but nothing happens which means that i don't receive anything


    For the client i use

    VB Code:
    1. Winsock1.Connect txtIp.Text, 23
    2. Winsock1.SendData "Test"

    I don't think there's a client problem for not receiving anything right?
    Anyway i would really appreciate any help because i am on the finishing touches of my project and i am really stuck
    Last edited by MyTHoS_; Feb 6th, 2006 at 05:10 PM.

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