Skip to main content

Posts

Showing posts with the label client

TCP chat application developement from the scratch in C/C++

This is my first tutorial for you guys. I have 12+ years of experience in IP telecommunication, networking, A/V media and computer vision.    This tutorial is the start of a long line of tutorials. With this, you will have in hand experience of how to write TCP server-client applications that can be used for chat and audio-video calls in the long run. So please stay tuned and do not miss it! I will also put a series of tutorials for Android native network programming.                                                      https://youtu.be/Faa_tqJpTzM?si=JDuYgE13_rwxdZY6

Threaded multi Chat room client source code in c++ with MFC Part - 3

PREVIOUS ClientDlg.cpp is the class where all the action from user's are taken and initiated. The interaction with GUI to logic is so great and easy which will help any developer to understand the flow of code. Function for login -- void CClientDlg::OnBnClickedButton2() {     // TODO: Add your control notification handler code here     cTh = AfxBeginThread(     StaticThreadFunc,     this);         m_Thread_handle = cTh->m_hThread; } Start the thread for a login action. UINT __cdecl CClientDlg::StaticThreadFunc(LPVOID pParam) {     CClientDlg *pYourClass = reinterpret_cast<CClientDlg*>(pParam);     UINT retCode = pYourClass->ThreadFunc();     return retCode; } UINT CClientDlg::ThreadFunc() {     // Do your thing, this thread now has access to all the classes member variables     ...

Threaded multi Chat room client source code in c++ with MFC Part - 2

PREVIOUS                                                                                                                                NEXT Client.cpp class is the MFC GUI initiation class. You can have a look here .. BOOL CClientApp::InitInstance() {     // InitCommonControlsEx() is required on Windows XP if an application   ...

Threaded multi Chat room client source code in c++ with MFC Part - 1

As in my previous post I have talk about server , now it's time for client. This client will use as multi chat client with our very own server. In this client you need to provide server IP , PORT and an USERNAME . Then just click the log in button and you are in if you get an welcome message from server. Technology used: i.   C++ ii.   Microsoft visual Studio 2010 iii.  MFC GUI iv.  Winshock2 Socket v.   TCP/UDP vi.  Windows Thread This project consist of  3 classes. 1. Client.cpp 2. ClientDlg.cpp 3. ClientCon.cpp Lets start with core portion -- I mean the network level connection portion. I have used the Winshock2 library for the purpose of network communication. You can use this library on windows  with MVS 2010 by including library -- # include <winsock2.h> And as it is multi user  and have GUI so we need thread. For this I have used Windows thread. You can use this windows thr...

Lync 2010 client does not login in Lync 2013 server

ISSUE:   Lync 2010 client does not login in Lync 2013 server. CAUSE:   The cause may be following one from 3. i.   Client version filter in Lync SERVER ii.  Network Security: Minimum session security in Lync SERVER SOLUTION: i.   Client version filter in Lync SERVER :  Here ii.  Network Security: Minimum session security in Lync SERVER :  Here

Video Conferencing Project in Java Source Code

My video conferencing project was completed as 300 project for 3rd year.It is not totally completed. There is some bug in here.To solve these bugs and to help other students this project is open.It is first try to make a project open source in this way so it can be modified.Any kind of question against this project will be answered. As this project was created in 3rd year 1st semester and now i nearly completed my BSc. so there will be little description about this.I will try to describe every class and function later when i get the chance.   For more details and how to build and run go to this link   in github.com . Latest code and binary release : VideoConference-v1.1 Older code and binary release : VideoConference-v1.0 Fix: 1. When in Video chat the Text chat option hanged for good. ################################################################################# FEATURE #############################################################################...

SCTP server client Code in C

Client.c #include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <netinet/sctp.h> #include <arpa/inet.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <errno.h> #define RECVBUFSIZE     4096 #define PPID            1234 int main() {        int SctpScocket, in, flags;        socklen_t opt_len;        char * szAddress;        int iPort;        char * szMsg;        int iMsgSize;        char a[1024];            struct sockaddr_in servaddr = {0};        struct sctp_status status = {0};    ...

UDP server client in c

Server #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <stdlib.h> int main() {         int sock;         int addr_len, bytes_read;         char recv_data[1024],send_data[1024];         struct sockaddr_in server_addr , client_addr;         if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {             perror("Socket");             exit(1);         }         server_addr.sin_family = AF_INET;         server_addr.sin...

TCP server client in C

Client Code #include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <netdb.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> int main() {         int sock, bytes_recieved;         char send_data[1024],recv_data[1024];         struct hostent *host;         struct sockaddr_in server_addr;         host = gethostbyname("127.0.0.1");         sock = socket(AF_INET, SOCK_STREAM,0);         server_addr.sin_family = AF_INET;         server_addr.sin_port = htons(5000);         server_addr.sin_addr = *((struct in_addr *)host->h_addr);   ...

Video Conferencing Source code in JAVA

My video conferencing project was completed as 300 project for 3rd year.It is not totally completed. There is some bug in here.To solve these bugs and to help other students this project is open.It is first try to make a project open source in this way so it can be modified.Any kind of question against this project will be answered. As this project was created in 3rd year 1st semester and now i nearly completed my BSc. so there will be little description about this.I will try to describe every class and function later when i get the chance. ####################################################### FEATURE  ####################################################### 1.Multi Chat(Used Threadpole) 2.P2P Chat 3.P2P Audio Chat 4.P2P Video Chat 5.Complete Automated 6.H.263 compression Video  7.raw audio PREREQUISITE:  1. JUST INSTALL jmf-2.1.1 e 2.SQL LINK OF THE SOURCE CODE