## socket.api
#
# This api extends the threadless socket--premicrothread.api with mailop
# constructors for the input operations and accept.
# Compiled by:
#
src/lib/std/standard.lib### "Before long, you can step outside the bounds
### of the tools that have already been provided
### by the designers of the system and solve
### problems that don't quite fit the mold.
###
### "This is sometimes called hacking; in other contexts,
### it is called "engineering." In essence, it is the
### ability to build a tool when the right one is not
### already on hand."
###
### -- Tim O'Reilly
stipulate
include package threadkit; # threadkit is from
src/lib/src/lib/thread-kit/src/core-thread-kit/threadkit.pkg package w8v = vector_of_one_byte_unts; # vector_of_one_byte_unts is from
src/lib/std/src/vector-of-one-byte-unts.pkg package sok = socket__premicrothread; # socket__premicrothread is from
src/lib/std/socket--premicrothread.pkgherein
# This api is implemented in:
#
#
src/lib/std/src/socket/socket.pkg #
api Socket {
#
Mailop(X) = Mailop(X);
include api Synchronous_Socket; # Synchronous_Socket is from
src/lib/std/src/socket/synchronous-socket.api #
# We avoid dragging in the non-blocking
# ops from api Socket in socket--premicrothread.api.
# connect_mailop: (Threadkit_Socket( X, Y ), Socket_Address(X)) -> Mailop( Void );
# accept_mailop
# :
# Threadkit_Socket( X, Stream(Passive) )
# ->
# Mailop( ( Threadkit_Socket( X, Stream(Active) ),
# Socket_Address(X)
# ) );
# Socket input mailop constructors:
#
# receive_vector_mailop
# :
# (Threadkit_Socket( X, Stream( Active )), Int)
# ->
# Mailop( vector_of_one_byte_unts::Vector );
# receive_rw_vector_mailop
# :
# (Threadkit_Socket( X, Stream( Active ) ), rw_vector_slice_of_one_byte_unts::Slice)
# ->
# Mailop( Int );
# receive_vector_mailop'
# :
# (Threadkit_Socket( X, Stream( Active ) ), Int, In_Flags)
# ->
# Mailop( vector_of_one_byte_unts::Vector );
# receive_rw_vector_mailop'
# :
# ( Threadkit_Socket( X, Stream( Active ) ),
# rw_vector_slice_of_one_byte_unts::Slice,
# In_Flags
# )
# ->
# Mailop( Int );
# receive_vector_from_mailop
# :
# (Threadkit_Socket( X, Datagram ), Int)
# ->
# Mailop( (vector_of_one_byte_unts::Vector, Socket_Address(Y)) );
# receive_rw_vector_from_mailop
# :
# (Threadkit_Socket( X, Datagram ), rw_vector_slice_of_one_byte_unts::Slice)
# ->
# Mailop( (Int, Socket_Address(X)) );
# receive_vector_from_mailop'
# :
# (Threadkit_Socket (X, Datagram), Int, In_Flags)
# ->
# Mailop( (vector_of_one_byte_unts::Vector, Socket_Address(Y)) );
# receive_rw_vector_from_mailop'
# :
# ( Threadkit_Socket( X, Datagram ),
# rw_vector_slice_of_one_byte_unts::Slice,
# In_Flags
# )
# ->
# Mailop( (Int, Socket_Address(X)) );
receive_vektor : (sok::Socket(X, Stream(Active)), Int) -> w8v::Vector;
receive_vektor' : (sok::Socket(X, Stream(Active)), Int) -> Mailop( w8v::Vector );
recv_v__syscall: (Int, Int, Bool, Bool) -> w8v::Vector;
set__recv_v__ref: ({ lib_name: String, fun_name: String, io_call: ((Int, Int, Bool, Bool) -> w8v::Vector) } -> ((Int, Int, Bool, Bool) -> w8v::Vector)) -> Void;
recv_v_mailop__syscall: (Int, Int, Bool, Bool) -> Mailop(w8v::Vector);
set__recv_v_mailop__ref: ({ lib_name: String, fun_name: String, io_call: ((Int, Int, Bool, Bool) -> w8v::Vector) } -> ((Int, Int, Bool, Bool) -> Mailop(w8v::Vector))) -> Void;
};
end;
## COPYRIGHT (c) 1996 AT&T Research.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.