How can I send data over the internet using a socket?

后端 未结 8 1479
情歌与酒
情歌与酒 2020-12-25 09:11

I would like to send data over internet through a desktop application. I know a little bit about sockets. I have transferred the data within the LAN, but now I want to trans

8条回答
  •  隐瞒了意图╮
    2020-12-25 10:10

    What you want to know depends heavily on many parts of your infrastructure.

    If you want to send data to a server that is transparently connected to the internet, it is as easy as connecting to it's IP adress.

    If you want to connect to some friend with a broadband connection, things get tricky. You usually have to configure both of your routers (or at least the target one) for NAT.

    Familiarize yourself with NAT, and the basics of IP routing. The details you provided are not sufficient to describe exactly what you want to do.

提交回复
热议问题