NAME ^

src/io/win32.c - Win32 Socket utility functions

DESCRIPTION ^

This file implements OS-specific Socket functions for Win32 platforms.

References ^

Win32 System Programming, 2nd Edition.

Functions ^

PMC *Parrot_io_socket_win32

Uses socket() to create a socket with the specified address family, socket type and protocol number.

INTVAL Parrot_io_connect_win32

Connects *io's socket to address *r.

INTVAL Parrot_io_send_win32

Send the message *s to *io's connected socket.

INTVAL Parrot_io_recv_win32

Receives a message in **s from *io's connected socket.

INTVAL Parrot_io_bind_win32

Binds *io's socket to the local address and port specified by *l.

INTVAL Parrot_io_listen_win32

Listen for new connections. This is only applicable to STREAM or SEQ sockets.

PMC *Parrot_io_accept_win32

Accept a new connection and return a newly created 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 compilation

SEE ALSO ^

src/io/win32.c, src/io/unix_socket.c, src/io/io.c, src/io/io_private.h.


parrot