EmbLogic's Blog

Author Archives: deepak.jain

Code that uses AF_UNIX address family to implement chatting between a single client and server.

RCS file: server.c,v Working file: server.c head: 1.12 branch: locks: strict root: 1.12 access list: symbolic names: keyword substitution: kv total revisions: 12;    selected revisions: 12 description: Code to demonstrate how a server accepts connections from a client on the … Continue reading

Posted in Project 04: FTP based Client Server using Threads and Sockets | Leave a comment

Code that uses AF_INET address family to implement chatting between client and server through loopback address.

RCS file: server.c,v Working file: server.c head: 1.15 branch: locks: strict root: 1.15 access list: symbolic names: keyword substitution: kv total revisions: 15;    selected revisions: 15 description: Code to demonstrate how a server accepts connections from a client on the … Continue reading

Posted in Project 04: FTP based Client Server using Threads and Sockets | Leave a comment

Code that takes a username and password from the user as an input,matches it with the master database file to find whether it is correct or not.

RCS file: username_password.c,v Working file: username_password.c head: 1.7 branch: locks: strict root: 1.7 access list: symbolic names: keyword substitution: kv total revisions: 7;    selected revisions: 7 description: Code that takes a specific username and password from a user.Matches it with … Continue reading

Posted in Uncategorized | Leave a comment

Code for a client/server application that uses AF_INET address family for IP sockets.

RCS file: server.c,v Working file: server.c head: 1.6 branch: locks: strict root: 1.6 access list: symbolic names: keyword substitution: kv total revisions: 6;    selected revisions: 6 description: Program to demonstrate how a connection oriented server creates a IP socket to … Continue reading

Posted in Project 04: FTP based Client Server using Threads and Sockets | Leave a comment

Code for a client/server application that uses AF_UNIX address family for local sockets.

RCS file: simple_c_s_app.c,v Working file: simple_c_s_app.c head: 1.10 branch: locks: strict root: 1.10 access list: symbolic names: keyword substitution: kv total revisions: 10;    selected revisions: 10 description: A simple client/server application in which a server waits for client requests. —————————- … Continue reading

Posted in Project 04: FTP based Client Server using Threads and Sockets | Leave a comment

Code to demonstrate how to register a signal handler using sigaction() for SIGINT signal.

RCS file: sigaction.c,v Working file: sigaction.c head: 1.5 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 5;    selected revisions: 5 description: Code to establish a simple handler for termination signals using sigaction. The signal handler will … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

Program to understand the working of user defined signals:SIGUSR1 and SIGUSR2.

RCS file: sigusr_signal.c,v Working file: sigusr_signal.c head: 1.8 branch: locks: strict root: 1.8 access list: symbolic names: keyword substitution: kv total revisions: 8;    selected revisions: 8 description: Code to understand the working of SIGUSR1 and SIGUSR2. —————————- revision 1.8    locked … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

Server process handling the requests of multiple clients using Shared memory IPC mechanism.

RCS file: server.c,v Working file: server.c head: 1.15 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 15;    selected revisions: 15 description: Code of the server process that will handle multiple requests from the clients. In this … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

Pthread program to understand the working of Thread Semaphore.

RCS file: simple_wait_and_post.c,v Working file: simple_wait_and_post.c head: 1.11 branch: locks: strict root: 1.11 access list: symbolic names: keyword substitution: kv total revisions: 11;    selected revisions: 11 description: Code to demonstrate the working of sem_wait and sem_post. —————————- revision 1.11    locked … Continue reading

Posted in Project 04: FTP based Client Server using Threads and Sockets | Leave a comment

Pthreads program to find Sum of first n-natural numbers,thread synchronization is achieved by using sleep() system call.

RCS file: sum_of_n_natural_number.c,v Working file: sum_of_n_natural_number.c head: 1.7 branch: locks: strict root: 1.7 access list: symbolic names: keyword substitution: kv total revisions: 7;    selected revisions: 7 description: Code to demonstrate the sum of first n-natural numbers using Pthreads. —————————- revision … Continue reading

Posted in Project 04: FTP based Client Server using Threads and Sockets | Leave a comment

Creating N-number of threads specified in the command line by the user and each of them will display a message and it’s thread-id

RCS file: N_threads.c,v Working file: N_threads.c head: 1.10 branch: locks: strict root: 1.10 access list: symbolic names: keyword substitution: kv total revisions: 10;    selected revisions: 10 description: Code that will create N number of threads specified in the command line,each … Continue reading

Posted in Project 04: FTP based Client Server using Threads and Sockets | Leave a comment

Code to demonstrate how to pass string to a thread

RCS file: passing_string.c,v Working file: passing_string.c head: 1.4 branch: locks: strict root: 1.4 access list: symbolic names: keyword substitution: kv total revisions: 4;    selected revisions: 4 description: Code to pass string to a thread. —————————- revision 1.4    locked by: root; … Continue reading

Posted in Project 04: FTP based Client Server using Threads and Sockets | Leave a comment

Code to demonstrate how to pass integer data to a thread.

RCS file: passing_data_to_threads.c,v Working file: passing_data_to_threads.c head: 1.9 branch: locks: strict root: 1.9 access list: symbolic names: keyword substitution: kv total revisions: 9;    selected revisions: 9 description: Code to demonstrate how to pass data to threads. —————————- revision 1.9    locked … Continue reading

Posted in Project 04: FTP based Client Server using Threads and Sockets | Leave a comment

Creating two threads which then display two different messages untill a condition is satisfied and making the main thread to wait for them to finish.

RCS file: simple_thread.c,v Working file: simple_thread.c head: 1.14 branch: locks: strict root: 1.14 access list: symbolic names: keyword substitution: kv total revisions: 14;    selected revisions: 14 description: A simple thread program in which 2 threads are created and 2 separate … Continue reading

Posted in Project 04: FTP based Client Server using Threads and Sockets | Leave a comment

Implementation of Client/Server application to compute SUM using IPC mechanism shared memory.

RCS file: client.c,v Working file: client.c head: 1.4 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 4;    selected revisions: 4 description: Client/Server program where client provides input to server via shared memory and server provides the … Continue reading

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment