I let this stew for a day so I'm not going to get into actual record formats but comment on what a DNS does.

In short it takes an English (or words) and turns them into the IP address of the server. So let's go with your site is currently at goldfinch.com.
Why not put in a record for email.goldfinch.com and another for your web servers (www.goldfinch.com and goldfinch.com)?



I'm trying to change some DNS records on GoDaddy so the website for a domain name is hosted by a different company but still ensure that the e-mail service that GoDaddy hosts for that domain is not interrupted. I have worked with the basics of Name Servers and NX records before but I am cloudy on how to do this.

Thank You.


i am using opencv library for video streaming and it is working perfectly .

I have to ask since a single connection can pump 1080p video, 5.1 audio and text in less than a 5 megabit link. I can't imagine why you would create a socket for each today.

video and audio needs to be send altogether so we need three sockets as multiple client can connect to server and request the data.


Very little experience on streaming audio and video and that experience was largely unsuccessful, so this post comes from that perspective. That said, a few points...

  1. This is clearly Intro To Sockets skeleton code that you have posted. If you are new to sockets, I'd advise that you learn basic socket programming first, THEN move on to video and audio streaming. Add in multi-threading, multi-core, high bandwidth, etc., and it gets a lot more complex fast. You can't just scale "Hello World" socket code.
  2. The ".h" in your includes along with your bzero function instead of memset suggests this is rather old code. Audio/video streaming has changed radically in recent years, so you might need to update your learning source.
  3. There are a whole bunch of libraries out there. I don't see any of them included in your code. Make sure you aren't re-inventing the wheel. I certainly did, learning sound technology from the ground up, not understanding it, trying again, etc., etc., then finding a library that took one percent of the effort, one percent of the time, one percent of the knowledge, and worked a thousand times better than my pathetic code. Yes, I was able to write some functioning code pasted together with duct tape, but I don't get a medal for being able to do that from scratch where most couldn't. I get a dunce camp for doing it from scratch.
Votes + Comments
+1 for Hello World scaling.

"But on modern OSes you can have the same app do all three and let the OS run 3 instances"

Could you through some light on this in order to create different sockets . i am trying with same using multithreading in linux but not sure how to incorporate video and audio stuff in below code by creating multiple threads. even i am not able to exit by typing exit in client terminal. i believe i need to create two more tasks i.e. task2-video and task3-Audio needs to be created. Please coorect me if i am worng.

   #include <string.h>
    #include <unistd.h>
    #include <stdio.h>
    #include <netdb.h>
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <netinet/in.h>
    #include <iostream>
    #include <fstream>
    #include <strings.h>
    #include <stdlib.h>
    #include <string>
    #include <pthread.h>
    using namespace std;

    void *task1(void *);

    static int connFd;

    int main(int argc, char* argv[])
        int pId, portNo, listenFd;
        socklen_t len; //store size of the address
        bool loop = false;
        struct sockaddr_in svrAdd, clntAdd;

        pthread_t threadA[3];

        if (argc < 2)
            cerr << "Syntam : ./server <port>" << endl;
            return 0;

        portNo = atoi(argv[1]);

        if((portNo > 65535) || (portNo < 2000))
            cerr << "Please enter a port number between 2000 - 65535" << endl;
            return 0;

        //create socket
        listenFd = socket(AF_INET, SOCK_STREAM, 0);

        if(listenFd < 0)
            cerr << "Cannot open socket" << endl;
            return 0;

        bzero((char*) &svrAdd, sizeof(svrAdd));

        svrAdd.sin_family = AF_INET;
        svrAdd.sin_addr.s_addr = INADDR_ANY;
        svrAdd.sin_port = htons(portNo);

        //bind socket
        if(bind(listenFd, (struct sockaddr *)&svrAdd, sizeof(svrAdd)) < 0)
            cerr << "Cannot bind" << ...

Thanks for your reply. My question is whether 3 server needs to be created or one server can handle all three port requests. if we create one server i.e (video) then that server will be always busy to handle continous video streaming and only will be free if client request to stop the video streaming and then only can handle other requests.

I want all the data (video ,audio,Text) has to be served altogether.


As I read this I have the impression you are new to multiple core systems and how an app can spawn itself to respond to each port handler.

That is, all skill levels arrive here so in your app, just go ahead and code your system to handle it as you wish and then use the IP API calls to register your app to handle the requests. The OS might spawn your app and use another CPU or thread without you working hard.

In parting, I take it you need to revisit how OSes like Linux do this today. That is, I never code to replace what the host OS does for me.


Hi All,

I am looking for a design approach to implement TCP socket server which is going to serve requests based on multiple ports.

(1) port1 : dedicated for video streaming
(2) port 2: dedicated for audio streaming
(3) port 3: dedicated for data streaming.

In above scenario do i need to create single server to take care with multiple port request or diff-2 server needs to be created for diff-2
request based on port configuration.

Is there any design strategy where connection pool of sockets can be created to serve above mentioned port based requests?

i appreciate if any samples of code to take care of above design will be shared.


@RJ. Like some folk they read on the web it slows down the machine so nope. When I get around to it I"m going to use my usual Linuxfoo and that Accessibility method to get into this one. After the files are safe, my bet is a clean install. May have to go the other route of removing the HDD, install a new SSD and clean install putting the old HDD into the usual USB case.


I think you have to be careful when talking about the Guest account. It's built in and we don't create another.

Can you share a tutorial about creating a Guest account? I am not asking for a tutorial on creating the usual user account.

And in parting, today or tommorrow I have a chance to work on a blown Windows 10 OS. The owner did something and they can no longer create a local login account for anyone else. It's not a bug either. They did something but forgot what.


The share folder working as I tested it though guest account, I also found a bug in Windows10 when making a guest account [read]; not sure if it's been logged but as of 1703 it hasn't been fixed.

The problem for which I've run into is, I want to share a folder for a specific user\group. When going to the properties > security tab of the folder I'm informed that I must have read permissions to view the properties of this object; click advanced to continue. I proceed and click advanced; from there I'm informed that the owner is unabled to be displayed. The only option I'm given is to Change the owner for which I select the user\group that I created followed by toggling on to replace owner on subcontainers and objects, then clicking apply.

Windows then informs me that I've taken ownership of the object and that I must close and reopen this object poperties. It's deja vu all over again when revisiting the properties of the folder followed by the Security tab as if I didn't apply any changes ?

If I attempt to share the folder by adding a user, I get an error that Access is denied and that the share resource was not created at this time.

I gave security access to the drive so I can share a folder within the drive; I've done just that or so I thought I've done that but it doesn't appear by Windows as if I have ...


@Siberian. Now that I know you are using reservation it's hardly ever that. I worried you had used hard assignment but in either case you check your IP and netmask and you are done for that step. It's not like you are going outside your LAN (or are you?)

Did you test this with the Guest account enabled? Just to see if that works?


There are so many Linux distros and no offense intended the struggle with Windows non-server sharing plus the firewall issues have me wondering if you are so close.

Not just you but I've found seasoned programmers that get hung over the firewalls everywhere problem. While I try to be clear you must be in command, many just want it to work without the time that needs investing.

Summary? Start with all firewalls in all devices off. Be sure your permissions, accounts, and ownerships are perfect.


Workgroup. Check.

IP for preferred DNS. Since workgroup doesn't use that, I'll write no reason to change. I'm going to copy something I keep in a sticky on another forum since so many want to debate the fireware issues. Ready?

Your router's firewall can block many features. You have a choice here to turn it off or dig in and find out what ports and more to allow. Given the cost of support and the fact that routers in the past never did this, my vote for those that don't want to become Network Ninja Gurus is to turn it off.

With that out of the way, an example from a router I recently discussed.

See Page 43: http://www.downloads.netgear.com/files/GDC/DGN2200/DGN2200_UM_3Feb11.pdf

Your modem router has a firewall that blocks unauthorized access to your wireless network and permits authorized inbound and outbound communications. Authorized communications are established according to inbound and outbound rules. The firewall has the following two default rules. You can create custom rules to further restrict the outbound communications or more widely open the inbound communications:
• Inbound. Block all access from outside except responses to requests from the LAN side.
• Outbound. Allow all access from the LAN side to the outside"

Notice how an inbound access from WiFi is blocked? You'll want to change that.
Page 44 (using the page counter in the PDF viewer) shows the default is BLOCK ALWAYS.

This means features like access to a DLNA, NAS or other server can fail.

Again, you must ...