parrotcode: Win32 Socket utility functions | |
Contents | C |
src/io/win32.c - Win32 Socket utility functions
This file implements OS-specific Socket functions for Win32 platforms.
Win32 System Programming, 2nd Edition.
PMC *Parrot_io_socket_win32
socket()
to create a socket with the specified address family,
socket type and protocol number.
INTVAL Parrot_io_connect_win32
*io
's socket to address *r
.
INTVAL Parrot_io_send_win32
*s
to *io
's connected socket.
INTVAL Parrot_io_recv_win32
**s
from *io
's connected socket.
INTVAL Parrot_io_bind_win32
*io
's socket to the local address and port specified by *l
.
INTVAL Parrot_io_listen_win32
STREAM
or SEQ
sockets.
PMC *Parrot_io_accept_win32
Socket
PMC.
STRING *Parrot_io_sockaddr_in
Parrot_io_sockaddr_in()
is not part of the layer and so must be extern
.XXX: We can probably just write our own routines (htons()
,
inet_aton()
,
etc.) and take this out of platform specific compilationsrc/io/win32.c, src/io/unix_socket.c, src/io/io.c, src/io/io_private.h.
|