Posts tagged Stream
A socket is a software endpoint that establishes bidirectional communication between a server program and one or more client programs.
It has two types UDP and TCP
It’s a connectionless protocol.
It doesn’t required initializing a connection before doing communication.
there is no guarantee that the datagrams you have sent will be received in the same order by the receiving socket. You can’t know also if it’s received without defects or if it reached its destination
It’s a connection-oriented protocol.
a connection must first be established between the pair of sockets. While one of the sockets listens for a connection request (server), the other asks for a connection (client).
It is guaranteed that the packets you send will be received in the order in which they were sent.
in j2me we create th image using Imgae.createImage method
on of the overloaded constructrs takes an InputStream object
to get an InputStram from an HTTP resource we make a connection using GCF by passing the url to the Connector.open method