Skip to main content

Posts

Showing posts with the label server

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

[Node.Js] squel.js:167 throw _iteratorError2; ^ ReferenceError: Symbol is not defined

When you are using nodejs on RHEL 6.7 with the following version of default RHEL 6.7 repo, "node":"0.10.41","npm":"1.4. 29" This is basically a version mismatch of squel library with node. So you just need to downgrade the squel version  or upgrade the nodjs version. Upgrading over 0.10.X in RHEL 6.7 is tough without custom build or some online rpm. Error: /usr/eyeball/auth_server/node_ modules/squel/squel.js:167         throw _iteratorError2;               ^ ReferenceError: Symbol is not defined     at _registerValueHandler (/usr/eyeball/auth_server/ node_modules/squel/squel.js: 148:36)     at Object._buildSquel.cls. registerValueHandler (/usr/eyeball/auth_server/ node_modules/squel/squel.js: 294:5)     at _buildSquel (/usr/eyeball/auth_server/ node_modules/squel/squel.js: 1222:7)     at /usr/eyeball/auth_server/n...

Make CentOS 6.x an AD member of Windows IIS 2012 R2

Making a CentOS 6.x PC a domain member of an active directory is a tiresome work. I came across this painful task for several time and comes in a conclusion that atleast I will make a document which will be helpful to me in near future. On the meantime if anybody take this step for their use, I wouldn't mind. So I will go to the task step now -- i) First of all we need some basic (latest) software for making this task possible. They are -- 1. Samba 2. Samba-client 3. Samba-winbind 4. Krb5-workstation 5. Policycoreutils-python command for the task on console -- yum install -y ntpdate samba samba-client samba-winbind krb5-workstation policycoreutils-python   ii) Now it's time to make the windows active directory reachable from the centos PC. For that we need to add the active directory FQDN and IP address on resolv.conf So do it by opening file  /etc/resolv.conf and add the following --     domain ad.local     nameserver...

Threaded multi chat room server source code in c++ with MFC Part - 3

PREVIOUS   Now we will talk about the other MFC GUI portion which I have created and used threaded model. When in GUI the start button is clicked by providing port number on PORT text box this server start by creating a thread independent from GUI. You can start the server by ENTER also. Here is some code snap for help -- void CServerDlg::OnBnClickedButton1() {     // TODO: Add your control notification handler code here     cTh = AfxBeginThread(     StaticThreadFunc,     this);         //cTh->m_bAutoDelete = FALSE;     m_Thread_handle = cTh->m_hThread;     } Here we create a windows thread for back end action. UINT __cdecl CServerDlg::StaticThreadFunc(LPVOID pParam) {     CServerDlg *pYourClass = reinterpret_cast<CServerDlg*>(pParam);     UINT retCode = pYourClass->ThreadFunc(); ...

Threaded multi chat room server source code in c++ with MFC Part - 2

PREVIOUS  we will now demonstrate about the class Server.cpp . This class is the start point of the server project. It is basically used to call the MFC instance. There will be some preview of the class here as MFC is out of scope  at the moment -- BOOL CServerApp::InitInstance() {     // InitCommonControlsEx() is required on Windows XP if an application     // manifest specifies use of ComCtl32.dll version 6 or later to enable     // visual styles.  Otherwise, any window creation will fail.     INITCOMMONCONTROLSEX InitCtrls;     InitCtrls.dwSize = sizeof(InitCtrls);     // Set this to include all the common control classes you want to use     // in your application.     InitCtrls.dwICC = ICC_WIN95_CLASSES;     InitCommonControlsEx(&InitCtrls);     CWinApp::InitInstance();   ...

Threaded multi chat room server source code in c++ with MFC Part - 1

Multi-client chat server is open source as I have created it. In this server multiple user can log in and communicate with one another as multicast user. In reality it can use as a chat room server. Can be modified as peer to peer (p2p) text chat. It can also be used as a backbone of a video conferencing project. It has a beautiful and easy to use user interface in MFC. This project is compatible with Microsoft visual studio 2010. I will describe the use of class and function with source code. 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. Server.cpp 2. ServerDlg.cpp 3. ServerManager.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 2...

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

How to disable/enable client version filter on Microsoft lync server 2010/2013

ISSUE: How to disable/enable cleint version filter on Microsoft lync server 2010/2013 SOLUTION: Go to lync server front end. Then open lync server control panel. In the left navigation bar, click Clients , and then click Client Version Configuration . On the Client Version Configuration page, double-click the Global configuration in the list. In the Edit Client Version Configuration dialog box, verify that the Enable version control check box is selected and then, under Default action , select one of the following: Allow    Allows the client to log on if the client version does not match any filter in the Client version policies list. Block    Prevents the client from logging on if the client version does not match any filter in the Client version policies list. Block with URL    Prevents the client from logging on if the client version does not match any filter in the Client version policies list,...

How to export sip and a/v certificate from lync server and edge server in lync 2010/2013.

To enable a lync user 3 certificates are necessary. These certificates are exported from lync server, edge server and directory control. Certificate for specific services: 0. Root CA 1. SIP services/Lync Front-end. 2. AV services/Edge . 1. SIP services. : STEP 1.   Goto run in windows button in lower left corner and type mmc . STEP 2.   In mmc window selecte File-->Add/Remove snap-in. STEP 3.   Select Certificates from Add/Remove snap-in.   STEP 4.   Select Computer Account from Certificate Snap-in. STEP 5.    Click Next and do all of the necessary stuff on the way. STEP 6.   Select Personal->certificates from  mmc console. STEP 7.   After that select the certificate you need to export and click right button of mouse and from All Tasks select export . STEP 8.   Just follow necessary stuff and get your certificate by instruction from next click. For Edge server certificate follow the...

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