Jump to content
Sign in to follow this  

Cannot connect with 'TCPConnect()'

Recommended Posts



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

Share this post

Link to post
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

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.