Jump to content

Cannot connect with 'TCPConnect()'


SetEnv
 Share

Recommended Posts

Yup,

I'm trying to create a little client... But I cannot connect it to the needed server...

I dunno what's wrong in the script, so I placed the bugged part here.

I Really don't know why that's not working...

[Note: The server is up and running, I can connect to it using telnet]

Func SendReport($SendString)
    
    TCPStartup() ; Start TCPServices
    
    Dim $RServer[2] ; creating var
    
    $RServer = FileRead($RServersFile) ; reading server from file (ip:port)
    $Rserver = StringSplit($RServer,":") ; split $rserver to 'ip port'
    
    $RSocket = TCPConnect($RServer[1], $RServer[2]) ; creating socket
    
    If $RSocket = -1 Then ; -> The script always stop here... Why???
        TrayTip("debug", "Error: cannot connect to the server", 3, 3)

As I said, I can correctly connect to the server when using TELNET...

So, what's wrong in this <little> part of code? o_O

Thanks by advance!

Edited by SetEnv
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...