
Ethernet Developers Guide
840 USE 115 00 Version 1.0
69
B.7 The CSample_View Class
The CSample_View class mana
es the TCP/IP connection, sends re
uests to
remote nodes, and displa
s either connection state, or the results of a transaction.
In addition it sets the states of the tool bar buttons and menu items.
B.7.1 Accessing TCP/IP
The CSample_View interfaces with window sockets via its application
pro
rammin
interface, and via messa
es sent b
the window sockets DLL to the
CSample_View window. The reference for the window socket API is
iven above.
The first call made to the window sockets DLL must be WSAStartup. This call is
made b
InitInstance member function of the CSample_app class. The last call to
the window socket DLL must be WSACleanup. This call is made b
the
ExitInstance member function of the Csample_app class.
The CSample_View allocates and sets the socket attributes. The attributes it sets
are
iven in the followin
table.
Set Lin
er to cause a hard close
Receive out of band data in the normal data stream
Disable Na
el al
orithm for send coalescin
When Na
el al
orithm is disabled, if the stack receives an application messa
e, it
will immediatel
pass the messa
e to the application and will send a TCP/IP
acknowled
ment messa
e. Althou
h this can
enerate more traffic, the application
receives the messa
e sooner then if Na
el al
orithm is enabled. The member
function tcpip_setsocket_options sets the socket attributes.
The window socket interface provides the WSAAs
ncSelect function which notifies
the window of network events. The member function tcpip_setsocket_options calls
WSAAs
ncSelect function. The different events are
iven b
the followin
table.
Event Description
FD_READ A socket can read data
FD_WRITE A socket can write data
FD_OOB A socket can read out of band data
FD_CONNECT A connect response has been received
FD_CLOSE The connection has been closed
Comentários a estes Manuais