• Aucun résultat trouvé

Assignment A.2.1:Explain to your instructor the rationale of the

N/A
N/A
Protected

Academic year: 2022

Partager "Assignment A.2.1:Explain to your instructor the rationale of the"

Copied!
1
0
0

Texte intégral

(1)

Windows Operating System Internals Assignments OS A.2

© 2005 David A. Solomon and Mark Russinovich

Assignment A.2.1:

Explain to your instructor the rationale of the WSAAsyncSelect() system call.

Suggest for a hypothetical, single-threaded application using WSAAsyncSelect() an alternative solution using multiple threads.

Discuss portability of both approaches.

Assignment A.2.2:

Design and implement two programs rcat.exe and receive.exe using the Windows socket API. The first one should be a socket client application that takes a server address (IP address + port) and an input file and sends its content to a (possibly) remote server. The latter one should be able to act as the server (on a given port) and print the received file’s content on standard output.

Usage of rcat.exe and recieve.exe:

$ rcat 127.0.0.1:4000 file.txt | receive 4000

Use the winsock functions socket(), bind(), listen(), connect(), accept(), send(), recv().

Assignment A.2.3:

Design and implement a version of the UNIX talk program using the Windows socket API. Your application should connect two processes via a socket connection;

input of the first one should be echoed by the second one and vice versa.

Use multiple threads to handle the data transfer from the socket to standard output and from standard input to the socket, respectively.

Usage of talk.exe:

$ talk 127.0.0.1:3000 # starting the server

$ talk 127.0.0.1:3000 # client connects to server

Your application has to behave as server and client, respectively. Your code should use connect() to check for an available server. If no server is found, your

application should become a server, using bind(), listen(), accept() to wait for a connecting client.

Discuss how your application would change if it should be implemented in a single thread.

Assignment A.2.4:

Design and implement a simple echo service using connection-less socket communication (via UDP). Write an echo server and an echo client application.

The client should read a line from standard input and send it to the server in a UDP packet; the server should convert the text into upper-case and return it to the client in another UDP packet.

December 2005 by David A. Solomon and Mark Russinovich with Andreas Polze 1

Références

Documents relatifs

mechanism can be used to decrease the amount of traffic on the network; the client instructs one server to transfer a file to another server, rather than transferring the

If the destination given by <target> is an actual server, the destination server is REQUIRED to report all servers, services and operators which are connected to it; if

This document specifies two DHCPv6 options [1] that allow SIP clients to locate a local SIP server that is to be used for all outbound SIP requests, a so-called outbound

(DHCP-for-IPv4) option that contains a list of domain names or IPv4 addresses that can be mapped to one or more Session Initiation Protocol (SIP) outbound proxy servers.. This

Informally, this rule means that a callout server that wants to get out of the loop fast should send a DWSS message immediately followed by a DWSR message; the server does

If the server determines that it does not want to include a ticket after it has included the SessionTicket extension in the ServerHello, then it sends a zero-length ticket

Hence, the location privacy problem is particularly applicable when Mobile IPv6 route optimization is used or when reverse tunneling is used without protecting the inner IP

In response to a handover trigger or indication, the mobile node sends a Fast Binding Update message to the Previous Access Router (PAR) (see Section 5.1).. Depending on