Talking about Internet programming, firstly we have to know that what Internet Programming is. So, here is some introduction to Internet Programming. All the devices and the application that works on internet communicate in one language Transmission Control Protocol or Internet protocol. As a developer, if you want to add internet functionality in your own made software then you should have a good knowledge of TCP and IP. SocketWrench is a general purpose component of TCP/IP which is regularly used. It is also the part of collection of large components of socket tool family. Socket tools help us in many interesting things like uploading files, sending emails, downloading files etc. At the same place, SocketWrenck makes its own custom client and server application. Socket tools then works and enables high level internet functionality in your software. Thus, it helps in simplifying application development. The best part of SocketWrench is that it does all this in very less number of lines of codes.
If we are talking about the Internet Programming, then the protocols establishes a “Rule of the Road” which is followed by each and every system in the network, so that all can communicate between each other without having any problem. Talking about the protocols, generally there are two kinds of protocols. First one is which consist of networking protocols. It deals with how two or more computers system communicates with each other. These are also known as lower level protocols. For example, of network protocols are TCP and UDP. The second one deal with how these application exchanges information and how does it perform certain task. These are known as higher level protocols such as HTTP and FTP. Most of the Internet protocols including which we discussed before are printed in a technical document named Request of Comments (RFCs).
The Transmission control Protocol (TCP)
If two computers exchange information on a network there are several components that are actually been placed before the data or information can actually been exchanged. There should be a network interface card (NIC) and a communication port, which is used in dial up networking connections. Apart from these physical connections, there are some protocols that define the parameters on which the whole process takes place. The most widely used protocol today is TCP/IP. The IP of a system looks something like 18.104.22.168. Some part of this address is used to find the network in which the particular system is and also the other systems.
The exchange of information is done mostly in a three way hand shake. This is done between client and a server. The client is totally responsible for initializing the connection between both. The first step is that the client sends a synchronization packet to server. This Packet contains the sequence number of client. In the next step the server sends an acknowledgement and synchronization packet. This packet also contains a sequence number in return. Finally in the third step the client sends the final acknowledgement to the server establishing the connection between the two. Once the connection is been set the transfer of information between both of them can be done easily.
The user Datagram Protocol
Unlike TCP it does not need to setup a connection with any other program in order to exchange information. In User Datagram Protocol data is actually exchanged in discrete units, which are called datagram. UDP is sometimes unreliable protocol because in UDP you done have any way out to find out whether the datagram is arrived to its destination or not. The only fields where UDP have an upper hand over TCP are speed and packet overhead. TCP is reliable in common use but UDP should be the first choice when it comes to fast transmission. For Example UDP is used in audio and video streaming.
When the exchange of information and data transfer takes places it have several important places to inform in the path. The first place is IP address of the remote host. This address is expressed in numerical value in dot notations or by logical name called hostname. These hostnames are separated in several pieces according to their time period, called domain. It is a hierarchical structure in which a top domain sets up the organization to which the whole network belongs. The sub domain does the specific work.
Client Server application
As mentioned previously, TCP works on a client server model. It means that when two programs exchange data, one of them should assume the role of client and other one should assume itself as server. In this case, the client performs the initialization of connection to server which is called active opens. Whereas, the server application listens to the incoming call which is called passive open. By accepting the connection they create a virtual circuit, which logically does the task of data transfer and exchange of in formations. When the server no longer wishes to respond the connection, it closes the passive socket.
One of the major problem that almost every developer faces is that it been distributed to end users. It is also difficult to track down errors because of the presence of so many variables. To deal with such difficulties the SocketWrench discovered a solution. They have made the ability to log the Window Socket API function Calls. Loggings up of Window Socket API function call basically have three properties in it. Trace, Trace file and Trace Flags. The Trace property simply enables or disables the function tracing feature. The Trace File keeps the specific trace log file in which the function and its parameters are written. Trace Flags deals with what kind of logging will be performed by the controls.
This is how the Internet Programming works with SocketWrench .NET. All the mentioned protocols are really the most important part in setting up of the network. Not following any of the protocol can result in many kinds of disturbance like improper exchange of information in the network.