6 #include <sys/socket.h> 68 int proto_osi3,
int flags) {
69 connect(dsthost, dstport, proto_osi3, flags);
83 int proto_osi3,
int flags) {
84 connect(dsthost.c_str(), dstport.c_str(), proto_osi3, flags);
99 int proto_osi3,
int flags) {
102 "inet_stream::connect() - Already connected!",
110 "inet_stream::connect() - Could not create socket");
133 int proto_osi3,
int flags) {
134 connect(dsthost.c_str(), dstport.c_str(), proto_osi3, flags);
Contains libsocket elements.
This class is instantiated and thrown when an error occurs. If there's an error somewhere in libsocke...
void connect(const char *dsthost, const char *dstport, int proto_osi3, int flags=0)
Set up socket if not already done.
int create_inet_stream_socket(const char *host, const char *service, char proto_osi3, int flags)
Create and connect a new TCP/IP socket.
string port
The port we're bound or connected to.
int sfd
sfd is the sockets API file descriptor
int proto
Which internet protocol version we're using.
inet_stream(void)
Void constructor; call connect() before using the socket!
string host
The address we're bound or connected to.
Contains all functions available in the C libsocket.