FAQ Database Discussion Community

Android:How to make all activity can use socket connections

I had to establish a socket in ActivityA in normal and ready to send data, but now I want to also be able to use the same socket connection to transmit the data in ActivityB.I have looked for information on the Internet, it seems can use the singleton.I studied...

Hazelcast in multinode docker environments with TCPIP

I am currently struggling with the following problem: I have a Java EE application that shall be able to run in a cluster (it actually does). For the data exchange between the nodes I use Hazelcast 3.3.3. Since our customers are afraid of UDP we use TCP. So I configure...

How can others connect on my AHKsocket winsock server? External IP?

Using AHKsock (AutoHotkey), I built a minimalistic client-server system with AHKsock_Connect, AHKsock_Send and AHKsock_Listen on both sides to communicate with each other. It works and I can send messages back and forth, if I connect to the server using localhost. But I want the server to be accessible from everywhere....

CloudFlare DNS Overview

This is a definitely a high level question so please take that with a grain of salt. I'm using GoDaddy as my registrar to point to my github pages website. I've uploaded the CNAME file and the URL resolves correctly. I've then set up CloudFlare on my site and am...

error C2440: char[]* to char* (pointers)

(Obvious beginner in c++, keep struggling with pointers) I've been trying to get the IP adress of the client as the server (using TCP), and to save it using a pointer to be able to re-use it later. In a previous function, I accept the connection and save the Socket...

Download the YouTube video file directly to user's computer through browser

<?php $youtubeUrl = "https://www.youtube.com/watch?v=Ko2JcxecV2E"; $content = json_encode ($file = shell_exec("youtube-dl.exe $youtubeUrl ")); $input_string =$content; $regex_pattern = "/Destination:(.*.mp4)/"; $boolean = preg_match($regex_pattern, $input_string, $matches_out); $extracted_string=$matches_out[0]; $file =explode(': ',$extracted_string,2)[1]; // Quick check to verify that the file exists if( !file_exists($file) ) die("File not found"); // Force the download header("Content-Disposition: attachment; filename=\"$file\"" );...

How does the client know the ephemeral port being used by the child TCP process?

While reading up on how TCP works, I have read in quite a lot of books which mention that after listen(), when a client connects to the server, accept() should be called by the socket programmer to accept the connection from the client. The parent TCP server process (listening on...

Multi-client chat program, broadcasting chat to all clients?

I'm trying to make a very simple chat program that can accommodate multiple clients. I have a multi-threaded server and can connect multiple clients to it, but the server only communicates with a single client (as it should, each client is on its own thread) I need help getting the...

Implementing HTTP proxy over SSL using CONNECT method from iPhone Applications

I am working on client-server solution, where my iPhone app connects to a server over TCP/IP using SSL connection. I want to make sure that entire traffic on SSL goes through the HTTP proxy server. We can specify HTTP proxy information on iPhone in Settings -> WiFi details-> HTTP proxy(Manual/Auto)....

Need help clarifying TCP ports

Researching about ports online, I have found it being described in many different ways. The main way is that a port is a like a door on your computer used by a specific process. A second way it is commonly explained is that it is just a tag, an extra...

Is there a difference in format between a packet received via SLIP and one from an Ethernet?

When pinging a uip device via SLIP, I get a packet in the uart that looks something like: uip_buf[0] 0x45 uip_buf[1] 0x0 uip_buf[2] 0x0 uip_buf[3] 0x3c uip_buf[4] 0x1 uip_buf[5] 0x20 uip_buf[6] 0x0 uip_buf[7] 0x0 uip_buf[8] 0x80 uip_buf[9] 1 uip_buf[10] 0xb5 uip_buf[11] 0x51 uip_buf[12] 0xc0 uip_buf[13] 0xa8 uip_buf[14] 0x1 uip_buf[15] 0x1...

Can I close the ServerSocket after accepting a client socket and establishing a connection?

The question is general, although my simple program is in Java. It concerns TCP/IP connections. What I need is the server socket to close as soon as possible after establishing a client connection. I need maximum one client at a time, and I don't want anybody else to be able...

What ip/port should i use for TCP Socket Server/Client connection?

i made basic TCP Socket server and client console application in c# with listener etc.. it works well with both server and client executed in same machine( I want to try it with different machines in same network(both connected to same modem). Which ip port should i use? I need...

Response is not getting in (android socket programming/ tcp/ip socket programming )

I am developing one Android Application in which I have to send location data on server and getting job data as a response in this way all communication is build but i am stuck of my mind on one thing when i trying to read the response from server the...

Re-transmission concept in TCP

Server sent data to client, but client didn't send ACK for the data . So once RTT completed , Server will resend data to client again .... like that how long it will try to send the data ? What is the maximum time server will try to send the...

how TCP segments can be misrouted

I am just wondering, how the TCP segments can be mis-routed, isn't the original source and the ultimate destination in the IP header never get touched!

c# Socket DuplicateAndClose

I am writing my Socket using TCP/IP protocol and I have a simple question. What does Socket.DuplicateAndClose() do? And when to use it?