SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 35 | Next

Jonathan Jacky, Margus Veanes, Colin Campbell, Wolfram Schulte

"Model-Based Software Testing and Analysis with C#"

The socket API is one of the
fundamental technologies of the Internet and is familiar to many developers. The
.NET framework provides an implementation of this API in the Socket class in the
System.Net.Sockets namespace.
Establishing a connection requires several steps, where each partner calls methods
in the socket API in a particular sequence (Figure 2.2). In the Server, Socket creates
a listener socket, Bind associates it with an IP address and a port number, and Listen
prepares for a connection. Accept makes the connection and creates a connection
socket to use for that connection. In the Client, Socket creates a socket and Connect
makes the connection. Once the connection is made, both partners call Send and
Receive to exchange messages. In our protocol, the client sends first. Both partners
call Close to finish the connection. In our protocol, the client closes first. Finally,
the server calls Close on its listener socket.
2.4 Libraries
Like most applications, our Monitor and Logger programs use libraries. They do
not call the .NET sockets API directly. Instead, they call methods in Client and
Server classes that we wrote (Figures 2.3??“2.5). These classes are wrappers for
.NET sockets that provide a similar but simplified API that is specialized for remote
instrument applications. Each wrapper method Socket, Bind, and so on, calls the
.NET socket method with the same name, but uses fewer parameters, or more
convenient parameters.


Pages:
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6