[Solved] How can I open application using C# from port 9999 [closed]

you could try this private void SendToServer(IPAddress IP, int Port) { try { TcpClient tcpclnt = new TcpClient(); tcpclnt.Connect(IP, Port); //your code here } UPDATE For the server you’ll use this public static void Main() { TcpListener serverSocket = new TcpListener(9999); TcpClient clientSocket = default(TcpClient); int counter = 0; serverSocket.Start(); Console.WriteLine(” >> ” + “Server … Read more

[Solved] How to format HTTP request to discord API?

t=”POST / HTTP/1.0\r\nAuthentication: Bot {token}\r\nHost: discord.com/api/guilds/{702627382091186318}/channels\r\n\r\n” This is not a valid HTTP request. You essentially send (line breaks added for clarity): POST / HTTP/1.0\r\n Authentication: Bot {token}\r\n Host: discord.com/api/guilds/{702627382091186318}/channels\r\n \r\n But a correct POST request would look like this instead: POST /api/guilds/{702627382091186318}/channels HTTP/1.0\r\n Authentication: Bot {token}\r\n Host: discord.com\r\n Content-length: … \r\n <body, where size matches … Read more

[Solved] TCP: Socket send/recv order [closed]

I’m guessing you use TCP? Then you have to remember that TCP is a streaming protocol, without message boundaries and without any start or end (except connection established and closed). A single recv call may receive less or more than what was sent in a single send call. You need to come up with a … Read more

[Solved] TCP: Socket send/recv order [closed]

Introduction TCP is a reliable, connection-oriented protocol used for communication between two hosts over a network. It is one of the most commonly used protocols in computer networks. The Transmission Control Protocol (TCP) is responsible for ensuring that data is sent and received in the correct order. This article will discuss the order in which … Read more

[Solved] Where is the getInputStream() function in java 1.8?

Well…no, there wouldn’t be, ServerSockets don’t have streamed input/output. A ServerSocket accepts connections, creating a Socket for each connection received (see accept), which is where the streams for that connection are. solved Where is the getInputStream() function in java 1.8?

[Solved] While (true) loop lagg [closed]

while(true) is an infinite loop, the only way of getting out of it is using break. Or changing while(true) to some condition that alternatively ends. In this code, the while(true) part makes no real sense to me, you should probably add something else to that part as well, e.g. some connection stuff etc. 6 solved … Read more

[Solved] Simple sharing text and number App(Client-side) over internet [closed]

There are multiple ways to approach this problem (REST, WebSocket, etc.) I recommend using sockets in this case but I’ll leave it up to you to read up on the pros/cons of different approaches. Socket.IO has a popular Android library for real-time bidirectional event-based communication between two nodes. At a high level, to use Socket.IO … Read more

[Solved] Simple sharing text and number App(Client-side) over internet [closed]

Introduction Sharing text and numbers over the internet can be a daunting task, especially when it comes to developing a client-side application. Fortunately, there are a few simple solutions that can help you quickly and easily share text and numbers over the internet. In this article, we will discuss how to create a simple sharing … Read more

[Solved] socket program to add integers in c

Simple: int my_int = 1234; send(socket, &my_int, sizeof(my_int), 0); The above code sends the integer as is over the socket. To receive it on the other side: int my_int; recv(socket, &my_int, sizeof(my_int), 0); However, be careful if the two programs runs on systems with different byte order. Edit: If you worry about platform compatibilities, byte … Read more