RE: Data Transmission Using Multi-Tasking-Sockets
Final Major Document-17.doc (Size: 1.15 MB / Downloads: 154)
This article is about a client/server multi-threaded socket class. The thread is optional since the developer is still responsible to decide if needs it. There are other Socket classes here and other places over the Internet but none of them can provide feedback (event detection) to your application like this one does. It provides you with the following events detection: connection established, connection dropped, connection failed and data reception (including 0 byte packet). Data transmission, digital transmission, or digital communications is the physical transfer of data (a digital bit stream) over a point-to-point or point-to-multipoint communication channel. Examples of such channels are copper wires, optical fibers, wireless communication channels, and storage media. The data is represented as an electromagnetic signal, such as an electrical voltage, radio wave, microwave, or infrared signal.
While analog communications is the transfer of continuously varying information signal, digital communications is the transfer of discrete messages. The messages are either represented by a sequence of pulses by means of a line code (baseband transmission), or by a limited set of continuously varying wave forms (pass band transmission), using a digital modulation method. The pass band modulation and corresponding demodulation (also known as detection) is carried out by modem equipment. According to the most common definition of digital signal, both baseband and pass band signals representing bit-streams are considered as digital transmission, while an alternative definition only considers the baseband signal as digital, and pass band transmission of digital data as a form of digital-to-analog conversion.
Data transmitted may be digital messages originating from a data source, for example a computer or a keyboard. It may also be an analog signal such as a phone call or a video signal, digitized into a bit-stream for example using pulse-code modulation (PCM) or more advanced source coding (analog-to-digital conversion and data compression) schemes. This source coding and decoding is carried out by codec equipment.
2.1 Identification of Need
Data transmission helps in transfer of data from one location to another location through secure networks or interfaces. The need for data transmission is to facilitate the sender and the receiver to reduce the interaction sources. Using data transmission by sockets both sender and receiver can exchange data from one point to another without their physical displacement. The need for data transmission finds its own importance with in a local area network where people from same organization can exchange data pertained to personal organization. A new method of data transmission is required to separate the unnecessary data from the actually important or much need and related data.
Normally, the sender need not worry about tinkering with the way that the underlying operating system and network stack sends and receives network data. The built-in algorithms define the low-level data organization and transmission; however, there are some ways to influence the behavior of these algorithms and provide more control on network connections. For example, if an application protocol uses timeouts and retransmission, the programmer might want to set or obtain the timeout parameters. He or she might also need to increase the size of send and receive buffers to ensure uninterrupted information flow in the network.
Stream sockets are reliable two-way connected communication streams. If you output two items into the socket in the order "1, 2", they will arrive in the order "1, 2" at the opposite end. They will also be error-free. Between them is the magical network that facilitates the transfer of data between the two machines. At the both ends of the connection is the TCP/IP protocol. The protocol translates data into a form the socket can understand. The individual applications then pump data through the socket. This particular type of connection is often defined as a client/server connection. The server offers its services to the client and manages incoming client requests. The client, on the other hand, makes its requests to the server, and expects an answer in reply.
2.2 Preliminary Investigation
The proposed model is such that the data transmission systems and methods are accurately involved. The data transmission system comprises an interface, a client, a server, and a client/server interface. The server transmits a request comprising transfer information comprising a start address and a length. The client interface receives the request from the server. The server interface determines a burst type of a first burst according to the transfer information, and transmits the first burst with the burst type to the client via the bus, where the first burst is aligned to at least one address boundary of the client. The server interface receives data corresponding to the first burst from the client, and transmits the data to the server.
A server socket can be referred as to a socket that can accept many connections. And a client socket is a socket that is connected to server socket. You may still use this class to communicate between two applications without establishing a connection. In the latter case, you will want to create two UDP server sockets (one for each application). This class also helps reduce coding need to create chat-like applications and IPC (Inter-Process Communication) between two or more applications (processes). Reliable communication between two peers is also supported with TCP/IP with error handling. The user may want to use the smart addressing operation to control the destination of the data being transmitted (UDP only).