Adding Half Duplex & Full Duplex TCP Client Server Code #98

Open
opened 2026-01-29 15:03:21 +00:00 by claunia · 0 comments
Owner

Originally created by @NVombat on GitHub (Aug 27, 2021).

Detailed description

A TCP Client and Server which can communicate bidirectionally but only one at a time to simulate Half Duplex Communication, and TCP Client and Server which can communicate bidirectionally simultaneously using the fork() system call which allows the client and server to receive and send messages at the same time simulating Full Duplex Communication.

Context

It helps explain the creating of a client and server to simulate half and full duplex communication systems.

Possible implementation

Full Duplex

Create Socket
Set Address
Bind to port
Listen for clients
Accept client
Fork & communicate
(Same for client)

Half Duplex

Create Socket
Set Address
Bind to port
Listen for clients
Accept client
Allow only one side to communicate at a time

Additional information

I have already implemented this code

Originally created by @NVombat on GitHub (Aug 27, 2021). ### Detailed description A TCP Client and Server which can communicate bidirectionally but only one at a time to simulate Half Duplex Communication, and TCP Client and Server which can communicate bidirectionally simultaneously using the fork() system call which allows the client and server to receive and send messages at the same time simulating Full Duplex Communication. ### Context It helps explain the creating of a client and server to simulate half and full duplex communication systems. ### Possible implementation Full Duplex ``` Create Socket Set Address Bind to port Listen for clients Accept client Fork & communicate (Same for client) ``` Half Duplex ``` Create Socket Set Address Bind to port Listen for clients Accept client Allow only one side to communicate at a time ``` ### Additional information I have already implemented this code
claunia added the enhancement label 2026-01-29 15:03:21 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/C#98