GLBasic forum

Main forum => GLBasic - en => Topic started by: Chris on 2010-Sep-16

Title: SSL using SOCK_TCPCONNECT
Post by: Chris on 2010-Sep-16
I'm trying to connect to a SOAP endpoint with SSL

    server$ = "api.betfair.com/global/v3/BFGlobalService"
    port%=443

    SOCK_INIT()

    sock% = SOCK_TCPCONNECT(server$, port%)

Everytime I try I get a -1 returned after about 5 seconds (which I guess is the timeout).

Any ideas?

Am I going about this the wrong way?

Thinking about this a little more...

What I think I need is the counterpart to NETWEBGET
Something like a NETWEBSET  (which doesn't exist in GLBASIC.... yet)

NETWEBSET("https://api.betfair.com/global/v3/BFGlobalService", 443,  "myxml")

Is there any equivalent, or am I going to have to do something "fruity" in C?

Thanks for any help in this... (hoping).
Title: Re: SSL using SOCK_TCPCONNECT
Post by: Chris on 2010-Sep-18
For anyone who's interested.

I used wireshark to sniff the packets, and it looks like SOCK_TCPCONNECT does NOT do any kind of SSL handling.  It just treats the port 443 as it would do for any other port.

If I needed to write a game that had secure TCP communication how would I go about doing this?

I would be grateful if anyone has any ideas.
Title: Re: SSL using SOCK_TCPCONNECT
Post by: Kitty Hello on 2010-Sep-30
No, I don't use SSL sockets. I might have to add a command to do that. Not sure if all platforms will support that.
Title: Re: SSL using SOCK_TCPCONNECT
Post by: Chris on 2012-Apr-11
Any Chance SSL could be added?  I bought GLBASIC some time ago, and its languished unused... This single feature would mean I would definitely use it.
Title: Re: SSL using SOCK_TCPCONNECT
Post by: Kitty Hello on 2012-Apr-11
I see if I can get it working. Might not be too hard. You want true sockets, or just curl?
Title: Re: SSL using SOCK_TCPCONNECT
Post by: kanonet on 2012-Apr-12
I would like to get this too! But about your question, i dont know, would cURL be able to connect to a 3rd party server, that dont uses cURL, but "real" secure sockets?
Title: Re: SSL using SOCK_TCPCONNECT
Post by: Kitty Hello on 2012-Apr-12
most stuff (dropbox...) uses curl. It's as if you type it in a browser. If, however, you want direct socket support to send raw tcp data, then something else has to be used.
Title: Re: SSL using SOCK_TCPCONNECT
Post by: kanonet on 2012-Apr-12
I think for me cURL will be all i need, but i dont know for others.
Title: Re: SSL using SOCK_TCPCONNECT
Post by: Chris on 2012-May-01
Sorry for the late reply... curl would probably do it for me.  :)
Just some way of doing standard protocols, nothing super low level is needed.

Thanks.
C.