It is currently Thu Sep 19, 2019 11:43 am

All times are UTC + 1 hour




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

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

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)

Code:
*SendBuffer   = AllocateMemory(1024)
InitNetwork()

RelayConnectionId = OpenNetworkConnection("192.168.1.10",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))
              Break
            EndIf
          ;EndIf
         
        Next
       
        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

_________________
Christos


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 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