Re: Create new socket
- Posted by jeremy (admin) Aug 25, 2009
- 954 views
euphoric said...
The primary thing is, I get rid of an ambiguous and inefficient "object" type declaration.
That's one thing I am unsure of and would like to have comments... There is a type socket. So, you could:
socket s = create()
However, if create() fails, it'll return a type error. I suppose the socket type could be modified to allow it to also be an atom, then you could:
socket s = create() if atom(s) then printf(1, "Could not create socket, error number: %d\n", { s }) end if
Jeremy