Relative Content

Tag Archive for sockets

String sentence consistency when sent over sockets

I am learning socket programming. I have a Java application as my server, and C# for the client. Just sending string lines from one to another. Below I have code snippets showing how I am currently doing it.

String sentence consistency when sent over sockets

I am learning socket programming. I have a Java application as my server, and C# for the client. Just sending string lines from one to another. Below I have code snippets showing how I am currently doing it.

String sentence consistency when sent over sockets

I am learning socket programming. I have a Java application as my server, and C# for the client. Just sending string lines from one to another. Below I have code snippets showing how I am currently doing it.

Socket Connecting to Large number of IPs

I have a text file of ~600 CIDR notation IP blocks which, when expanded, amount to ~17.5M IP addresses. I need to socket connect to each one. If it connects, I add it to a “live” list, if it returns an error/refusal, to a “dead” list. Then the socket is closed. I don’t need to read from it, I don’t need to write to it. Obviously, this is a problem of scale, if we generously assume that the connection takes only one second to return success or failure, it would take months to complete, but likely several years. I need to get it down to <24 hours.

Socket Connecting to Large number of IPs

I have a text file of ~600 CIDR notation IP blocks which, when expanded, amount to ~17.5M IP addresses. I need to socket connect to each one. If it connects, I add it to a “live” list, if it returns an error/refusal, to a “dead” list. Then the socket is closed. I don’t need to read from it, I don’t need to write to it. Obviously, this is a problem of scale, if we generously assume that the connection takes only one second to return success or failure, it would take months to complete, but likely several years. I need to get it down to <24 hours.

Java Socket or SocketChannel

I am designing a server for a remote file store in Java and trying to decide whether to use asynchronous java.nio.SocketChannels or the older blocking model with Sockets. What kind of factors should I consider when choosing between these two server architectures and what kinds of tasks would be better suited to one versus the other?

Java Socket or SocketChannel

I am designing a server for a remote file store in Java and trying to decide whether to use asynchronous java.nio.SocketChannels or the older blocking model with Sockets. What kind of factors should I consider when choosing between these two server architectures and what kinds of tasks would be better suited to one versus the other?