Add checks for invalid socket when creating sockets.

This commit is contained in:
Dominik Picheta 2014-04-15 13:51:25 +01:00
commit 21d0cc8cdf
7 changed files with 9 additions and 0 deletions

View file

@ -1,6 +1,7 @@
import sockets
var s: TSocket
s = socket()
if s == InvalidSocket: osError(osLastError())
s.connect("www.google.com", TPort(80))