It is currently Thu Apr 09, 2020 9:01 pm

All times are UTC + 1 hour

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: NetworkClientEvent _Data, Never triggered
PostPosted: Sat Aug 10, 2019 6:39 pm 
User avatar

Joined: Fri Apr 25, 2003 6:35 pm
Posts: 180
Location: Greece,Athens

i was hanging around this, it is very rare and difficult to track down

When connected to SPECIFIC server's NetworkClientEvent(RelayConnectionId) = #PB_NetworkEvent_Data is NEVER triggered, even actually data has been received to windows stack

The following (minimized) code works if you have the comments in the example server return Chr(13) every time
i..e we check for data at any case, not when #PB_NetworkEvent_Data is true

compiled with PureBasic 5.70 LTS (Windows - x86)

*SendBuffer   = AllocateMemory(1024)

RelayConnectionId = OpenNetworkConnection("",6200,#PB_Network_TCP)

stringtoSend.s = Chr(10)+"somedatahere"+Chr(13)
senddata = SendNetworkString(RelayConnectionId,stringtoSend,#PB_Ascii)

        For i=1 To 200
          ;If NetworkClientEvent(RelayConnectionId) = #PB_NetworkEvent_Data
            Debug "data received"
            RelayReceiveRequestLength.l = ReceiveNetworkData(RelayConnectionId,*SendBuffer,100)
            RelayReceivedCommandCommand$ = PeekS(*sendBuffer,RelayReceiveRequestLength,#PB_Ascii)
            If FindString(RelayReceivedCommandCommand$,Chr(13))
        Debug RelayReceivedCommandCommand$

note 1, if i connect to this "server" via telnet works as it should.
note 2, connected to different servers work as expected
note 3, only diffirence i have notive (with telnet) is that the "problematic" server closes connection by it self very quickly, compared to NON problematics
note 4, because of sensitivity of data, test server is available only via PM


Reply with quote  
 Post subject: Re: NetworkClientEvent _Data, Never triggered
PostPosted: Wed Jan 29, 2020 10:31 pm 

Joined: Fri May 17, 2002 4:39 pm
Posts: 14019
Location: France
We need more info, full working sippets to investigate this

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour

Who is online

Users browsing this forum: No registered users and 7 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye