Вы находитесь на странице: 1из 8

Networking in JAVA

What is Networking?
Communication between more than 2 pcs. Will be done by:1. LAN 2. MAN 3. WAN Main Question is How OSI Referance model works? Check it .ISO-OSI Reference Model

What is Socket?
A network socket is an endpoint of an inter-process communication flow across a computer network. Today, most communication between computers is based on the Internet Protocol; therefore most network sockets are Internet sockets. A socket API is an application programming interface (API), usually provided by the operating system, that allows application programs to control and use network sockets. Internet socket APIs are usually based on the Berkeley sockets standard. A socket address is the combination of an IP address and a port number

Socket types:---There are several Internet socket types available: Datagram sockets, also known as connectionless sockets, which use User Datagram Protocol (UDP) Stream sockets, also known as connection-oriented sockets, which use Transmission Control Protocol (TCP) or Stream Control Transmission Protocol (SCTP). Raw sockets (or Raw IP sockets), typically available in routers and other network equipment. Here the transport layer is bypassed, and the packet headers are made accessible to the application. There are also non-Internet sockets, implemented over other transport protocols, such as Systems Network Architecture .See also Unix domain sockets (UDS), for internal inter-process communication.

Socket in Client-Server

Some Reserved Sockets

Protocol
echo

Port
7

Protocol
TCP/UDP

Purpose
Echo is a test protocol used to verify that two machines are able to connect by having one echo back the other's input. Discard is a less useful test protocol in which all data received by the server is ignored. Provides an ASCII representation of the current time on the server. FTP uses two well-known ports. This port is used to transfer files. This port is used to send FTP commands like put and get. Used for encrypted, remote logins. Used for interactive, remote command-line sessions. The Simple Mail Transfer Protocol is used to send email between machines. A time server returns the number of seconds that have elapsed on the server since midnight, January 1, 1900, as a four-byte, signed, bigendian integer. A simple directory service for Internet network administrators. A service that returns information about a user or users on the local system. The underlying protocol of the World Wide Web.

discard daytime FTP data FTP SSH telnet smtp

9 13 20 21 22 23 25

TCP/UDP TCP/UDP TCP TCP TCP TCP TCP

time

37

TCP/UDP

whois finger HTTP

43 79 80

TCP TCP TCP

POP3

110

TCP

Post Office Protocol Version 3 is a protocol for the transfer of accumulated email from the host to sporadically connected clients.

NNTP

119

TCP

Usenet news transfer; more formally known as the "Network News Transfer Protocol".

IMAP

143

TCP

Internet Message Access Protocol is a protocol for accessing mailboxes stored on a server.

RMI Registry

1099

TCP

The registry service for Java remote objects.

Вам также может понравиться