answersLogoWhite

0


Best Answer

In socket programming, there are two sides to every conversation: the listener (or server), and talker (the client).

The server first opens a desired port, receives a socket handle, and begins listening for connections. It polls the socket every so often to listen for attempted connections by clients. Once a connection has been established, communication begins.

A client merely indicates an IP address and port to connect to. Once the connection is made, communication begins.

Then there are blocking and non-blocking sockets, which applies to both servers and clients. Blocking socketsforce the program to wait until there's activity before continuing its operation. So a server process will pause while waiting for a connection, and a client process will pause while waiting for the server to send data.

Under most conditions, non-blocking sockets are preferred. This allows the program to give up timeslices to the operating system, as well as conduct any activities in the background like listening to multiple connections (for servers).

Writing a socket program is about the same between Windows and Unix/Linux based systems, but there are some differences in setting up non-blocking sockets as well as initializing and closing the socket interface.

More information on both Win32 and Linux socket programming can be found in the related links below.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a socket program in C to implement a listener and a talker?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering
Related questions

What is the opposite of talker?

listener


How do you satisfy a wife?

Be a giver (and occasionally a taker). Also be a listener rather than just a talker.


How do you apply networking using lap link?

LapLink is a talker/listener application for transferring information between two computers. Serial port to the serial port or parallel port to parallel port communication is established between the two computers. One is set up as a talker and the other is set up as a listener.


What does it mean if a guy is a talker around everyone but a listener around a girl he's kind of friends with?

he probably likes you or whoever the "friends" are or just cares for them:)


Why does your teacher hates you?

u might have one of these simptumes : lazyness backtalk not listener talker a sister or bro that the teacher hates diff religions he/she or u have race coulture were u from what origin


What do you call a sleep talker?

a sleep talker


What fluent talker means?

fluent talker


Is talker a word?

Yes, "talker" is a word that refers to someone who talks frequently or persuasively. It can also describe a device that converts sound into electrical signals for communication.


Is talker an adverb?

No, it is not an adverb. The word talker is a noun.


When was NUTS - talker - created?

NUTS - talker - was created in 1993.


When was Fire Talker created?

Fire Talker was created in 2009.


What is Ofer Talker's birthday?

Ofer Talker was born on April 22, 1973.