Questions tagged [tcpsocket]

246 questions
2
votes
0 answers

Why my C# socket program has lots of \device\afd handles?

I've written a tcp socket prgram that working with sockets asyncoronously. This is some part of my code: public void main() { var e = new SocketAsyncEventArgs(); e.Completed += new EventHandler(e_Completed); …
Reza Akraminejad
  • 1,412
  • 3
  • 24
  • 38
2
votes
0 answers

Getting socket from file descriptor

I am writing a kernel module that polls TCP sockets for their queue sizes. I pass the socket file descriptor number to the module through procfs and then use sockfd_lookup to find the socket structure (struct socket) from that. I am using lsof to…
2
votes
3 answers

How do I convert a 24-bit integer into a 3-byte array?

Hey Im totally out of my depth and my brain is starting to hurt.. :( I need to covert an integer so that it will fit in a 3 byte array.(is that a 24bit int?) and then back again to send/receive this number from a byte stream through a socket I…
loststudent
  • 23
  • 1
  • 3
2
votes
1 answer

Create new Socket with null on Android 7.0 is not working

I am using Erlang-Lib in my android application to connect to a server. The connection to the server with android devices smaller than android 7 is working fine. Now I have tested the connection with an Sony Z5 and Huawei Mate 9 with android 7.0 and…
maryBlaa
  • 115
  • 10
2
votes
0 answers

React native TCP guide issue. "Object prototype may only be an Object or null." when doing var net = require('net');

I am following this guide on using tcp sockets in react native. I followed all the steps but when I run I get this error. The problem is with this line: var net = require('net'); This is my package.json { "name": "MyTCP", "version":…
2
votes
2 answers

How can async socket listener be closed correctly in separate thread?

I use a C# class for connection different child form. Project is MDI type. In the connection form, there is an Asynchronous Socket Listner called by thread. When I close my application, I can not close the listener and the program remains in…
Tarma
  • 143
  • 1
  • 11
2
votes
2 answers

Can TCP/UDP sockets and Websockets communicate with each other?

I have been going through this websockets article. Can a web-socket communicate with a TCP/UDP Socket and viceversa?
Taimoor Alam
  • 113
  • 1
  • 11
2
votes
0 answers

Components.classes TcpSocket not defined in Firefox addon for Firefox 44

I am writing a Firefox Addon. It contains the code var TcpSocket = Cc["@mozilla.org/tcp-socket;1"]; var tcpSocketListener = TcpSocket.createInstance(Ci.nsIDOMTCPSocket); It works perfectly fine in Firefox 40. However, when I run the same addon on…
user3421410
  • 337
  • 1
  • 3
  • 10
2
votes
1 answer

Efficient HTTP streaming in Firefox OS

I need to handle an infinite HTTP response (with Transfer-Encoding: chunked header). This response contains a stream of images, so it must be handled as efficiently as possible. XmlHttpRequest is not a solution here since it keeps all the reply in…
Lithy
  • 817
  • 12
  • 23
2
votes
1 answer

Reading socket response with php does not work

Code: $str = "example"; $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_connect($socket, "127.0.0.1", "2107"); socket_listen($socket); socket_write($socket, $str, strlen($str)); $resp =…
2
votes
0 answers

Filetransfer (zipped) with node.js / io.js

what is the correct way to transfer a binary zipped file (appr. 100MB, tar.gz) between two servers via a tcp socket. In general i got the transfer working, but the transferred file on the target is nearly double in size not usable anymore.…
tmoe
  • 303
  • 3
  • 10
2
votes
2 answers

Android tcp socket set etimedout value

I have tcp socket client on android. Also I have tcp socket server on nodejs, which sends to connected client test message every 2 seconds. When I launch application, it receives test messages from server. But when I switch off wi-fi connection, my…
Vüsal
  • 2,580
  • 1
  • 12
  • 31
2
votes
1 answer

Dotcloud www and TCP in single app -

I'm trying to get a nodejs socket server running that will allow remote communication between two clients running a Flash game that communicates using a custom protocol. Due to Flash security restrictions, it seems that the socket server must be…
blackbourna
  • 1,223
  • 2
  • 16
  • 29
1
vote
2 answers

Distributed issues scaling TCP servers on EC2 instances

Using EC2 instances (along with Amazon Auto Scaling and Elastic Load Balancing) I have several instances of a TCP server running in Amazon Web Services. Each EC2 instance has access to a centralized database (running on Amazon RDS). To make this…
Jon Cox
  • 10,622
  • 22
  • 78
  • 123
1
vote
1 answer

connecting android emulators using tcp sockets

the following is my code. Editor: Eclipse, Platform: Windows. Its a chat application where 2 android emulators connect through a tcp socket. UI consists of a send button, a text view and a text box. Problem: As soon as I type text and hit send, the…
BudsNanKis
  • 224
  • 5
  • 17
1 2
3
16 17