Method ConnectTO() doesn't work fine
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
I'm working with Sockets and when I tried to established an connection with a Server ( NTTP ) using Socket, the method connect doesn't work fine.
Loos this code :
Loos this code :
- Code: Select all Expand view
FUNCTION CONNECTNEWS()
PARAM oSocket,oStatus,oBoton1
nPort := 119
cServerIP := "200.67.153.171"
oStatus:cText( " Conectando a "+cServerIP +CRLF )
cTxt := oStatus:cText
oStatus:cText( cTxt+" Esperando respuesta ......"+CRLF )
oSocket := TSocket()
oSocket:New( nPort )
oSocket:Connect( cServerIP, nPort ) // <----- ¡¡ error is here !!
oSocket:bConnect := { |o| NewsOn(o , oStatus ) }
oSocket:bRead := { |o| NewsRead(o , oStatus) }
RETURN( oSocket )
FUNCTION NEWSON()
PARAM oSocket,oStatus,cServerIp
cTxt := oStatus:cText
oStatus:cText( cTxt + " Ahora estas conectado. "+CRLF )
RETURN