Search Results

Search found 3489 results on 140 pages for 'tcp'.

Page 8/140 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Benefits of "Don't Fragment" on TCP Packets?

    - by taspeotis
    One of our customers is having trouble submitting data from our application (on their PC) to a server (different geographical location). When sending packets under 1100 bytes everything works fine, but above this we see TCP retransmitting the packet every few seconds and getting no response. The packets we are using for testing are about 1400 bytes (but less than 1472). I can send an ICMP ping to www.google.com that is 1472 bytes and get a response (so it's not their router/first few hops). I found that our application sets the DF flag for these packets, and I believe a router along the way to the server has an MTU less than/equal to 1100 and dropping the packet. This affects 1 client in 5000, but since everybody's routes will be different this is expected. The data is a SOAP envelope and we expect a SOAP response back. I can't justify WHY we do it, the code to do this was written by a previous developer. So... Are there are benefits OR justification to setting the DF flag on TCP packets for application data? I can think of reasons it is needed for network diagnostics applications but not in our situation (we want the data to get to the endpoint, fragmented or not). One of our sysadmins said that it might have something to do with us using SSL, but as far as I know SSL is like a stream and regardless of fragmentation, as long as the stream is rebuilt at the end, there's no problem. If there's no good justification I will be changing the behaviour of our application. Thanks in advance.

    Read the article

  • Perl TCP Server handling multiple Client connections

    - by Matt
    I'll preface this by saying I have minimal experience with both Perl and Socket programming, so I appreciate any help I can get. I have a TCP Server which needs to handle multiple Client connections simultaneously and be able to receive data from any one of the Clients at any time and also be able to send data back to the Clients based on information it's received. For example, Client1 and Client2 connect to my Server. Client2 sends "Ready", the server interprets that and sends "Go" to Client1. The following is what I have written so far: my $sock = new IO::Socket::INET { LocalHost => $host, // defined earlier in code LocalPort => $port, // defined earlier in code Proto => 'tcp', Listen => SOMAXCONN, Reuse => 1, }; die "Could not create socket $!\n" unless $sock; while ( my ($new_sock,$c_addr) = $sock->accept() ) { my ($client_port, $c_ip) = sockaddr_in($c_addr); my $client_ipnum = inet_ntoa($c_ip); my $client_host = ""; my @threads; print "got a connection from $client_host", "[$client_ipnum]\n"; my $command; my $data; while ($data = <$new_sock>) { push @threads, async \&Execute, $data; } } sub Execute { my ($command) = @_; // if($command) = "test" { // send "go" to socket1 print "Executing command: $command\n"; system($command); } I know both of my while loops will be blocking and I need a way to implement my accept command as a thread, but I'm not sure the proper way of writing it.

    Read the article

  • [java] tcp socket communication [send and recieve help]

    - by raven
    hello, I am creating a Chat in java. I have a method (onMouseRelease) inside an object that creates a tcp server and waits for a socket ServerSocket server = new ServerSocket(port); Socket channel = server.accept(); now I want to make a thread that will loop and read data from the socket, so that once the user on the other side sent me a string, I will extract the data from the socket [or is it called packet? sry I am new to this], and update a textbox to add the additional string from the socket [or packet?]. I have no idea how to READ (extract) the information from the scoket [/packet] and then update it into a JTextArea which is called userOutput. And how to Send a string to the other client, so that it will also could read the new data and update its JTextArea. (from what I know, for a 2 sided tcp communication you need one computer to host a server and the other to connect [as a client] and once the connection is set the client can also recieve new information from the socket. Is that true? and please tell me how ) Any help appreciated !! I know this is abit long but I have searched allot and didn't understand [I saw something like printwriter but failed to understand].

    Read the article

  • TCP socket communication

    - by raven
    hello, I am creating a Chat in java. I have a method (onMouseRelease) inside an object that creates a tcp server and waits for a socket like this: ServerSocket server = new ServerSocket(port); Socket channel = server.accept(); Now I want to make a thread that will loop and read data from the socket, so that once the user on the other side sends me a string, I will extract the data from the socket (or is it called packet? Sorry, I am new to this) and update a textbox to add the additional string from the socket (or packet?). I have no idea how to READ (extract) the information from the socket(/packet) and then update it into a JTextArea which is called userOutput. And how to send a string to the other client, so that it will also could read the new data and update its JTextArea. From what I know, for a 2 sided TCP communication you need one computer to host a server and the other to connect (as a client) and once the connection is set the client can also receive new information from the socket. Is that true? and please tell me how. Any help is appreciated! I know this is a bit long but I have searched a lot and didn't understand it (I saw something like PrintWriter but failed to understand).

    Read the article

  • TCP multicast and multithreading

    - by Fantastic Fourier
    I need to come up with clients that can multicast to other clients reliably. That implies I'll be using TCP to connect reliably between clients within a multicast group. Doesn't that come up to n^2 number of connections? That seems a little silly to me. Wouldn't/shouldn't there be a way to more easily multicast with reliability?

    Read the article

  • C# TCP socket and binary data

    - by MD
    Hi @All How to send binary data (01110110 for exemple) with C# throught a TCP (using SSL) socket ? I'm using : SslStream.Write() and h[0] = (byte)Convert.ToByte("01110110"); isn't working Thanks.

    Read the article

  • how to reassemble tcp segment?

    - by jerams
    im now developing a project using winpcap..as i have known packets being sniffed are usually fragmented packets. how to reassemble this TCP segements?..any ideas, suggestion or tutorials available?.. this i assume to be the only way i can view the HTTP header... thanks!..

    Read the article

  • Not receiving all message via TCP in Java?

    - by javatcp
    I have a tcp socket sending three lines like this out2.println("message1\n"); out2.println("message2\n"); out2.println("message3\n"); and another tco socket receiving and displaying these messages like this System.out.println(in.readLine()); System.out.println(in.readLine()); System.out.println(in.readLine()); but only the first message is recieved and displayed, anything I send after that is not.

    Read the article

  • Establishing a tcp connection from within a DLL

    - by Nicholas Hollander
    I'm trying to write a piece of code that will allow me to establish a TCP connection from within a DLL file. Here's my situation: I have a ruby application that needs to be able to send and receive data over a socket, but I can not access the native ruby socket methods because of the environment in which it will be running. I can however access a DLL file and run the functions within that, so I figured I would create a wrapper for winsock. Unfortunately, attempting to take a piece of code that should connect to a TCP socket in a normal C++ application throws a slew of LNK2019 errors that I can not for the life of me resolve. This is the method I'm using to connect: //Socket variable SOCKET s; //Establishes a connection to the server int server_connect(char* addr, int port) { //Start up Winsock WSADATA wsadata; int error = WSAStartup(0x0202, &wsadata); //Check if something happened if (error) return -1; //Verify Winock version if (wsadata.wVersion != 0x0202) { //Clean up and close WSACleanup(); return -2; } //Get the information needed to finalize a socket SOCKADDR_IN target; target.sin_family = AF_INET; //Address family internet target.sin_port = _WINSOCKAPI_::htons(port); //Port # target.sin_addr.s_addr = inet_addr(addr); //Create the socket s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (s == INVALID_SOCKET) { return -3; } //Try connecting if (connect(s, (SOCKADDR *)&target, sizeof(target)) == SOCKET_ERROR) { //Failed to connect return -4; } else { //Success return 1; } } The exact errors that I'm receiving are: Error 1 error LNK2019: unresolved external symbol _closesocket@4 referenced in function _server_disconnect [Project Path] Error 2 error LNK2019: unresolved external symbol _connect@12 referenced in function _server_connect [Project Path] Error 3 error LNK2019: unresolved external symbol _htons@4 referenced in function _server_connect [Project Path] Error 4 error LNK2019: unresolved external symbol _inet_addr@4 referenced in function _server_connect [Project Path] Error 5 error LNK2019: unresolved external symbol _socket@12 referenced in function _server_connect [Project Path] Error 6 error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function _server_connect [Project Path] Error 7 error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function _server_connect [Project Path] Error 8 error LNK1120: 7 unresolved externals [Project Path] 1 1 Many thanks!

    Read the article

  • TCP sequence number question

    - by Meta
    This is more of a theoretical question than an actual problem I have. If I understand correctly, the sequence number in the TCP header of a packet is the index of the first byte in the packet in the whole stream, correct? If that is the case, since the sequence number is an unsigned 32-bit integer, then what happens after more than FFFFFFFF = 4294967295 bytes are transferred? Will the sequence number wrap around, or will the sender send a SYN packet to restart at 0?

    Read the article

  • how to send an array of bytes over a TCP connection (java programming)

    - by Mark Roberts
    Can somebody demonstrate how to send an array of bytes over a TCP connection from a sender program to a receiver program in Java. (I'm new to Java programming, and can't seem to find an example of how to do this that shows both ends of the connection (sender and receiver.) If you know of an existing example, maybe you could post the link. (No need to reinvent the wheel.) P.S. This is NOT homework! :-)

    Read the article

  • WCF TCP Protocol

    - by jobless-spt
    I want to host a WCF service with TCP Protocol. I can host the service using IIS or Windows Service. I need to know what port I need to open for this service for it to be accessible by client?

    Read the article

  • python send/receive hex data via TCP socket

    - by Mike
    I have a ethenet access control device that is said to be able to communicate via TCP. How can i send a pachet by entering the HEX data, since this is what i have from their manual (a standard format for the communication packets sent and received after each command)

    Read the article

  • Linux tool to send raw data to a TCP server

    - by paul simmons
    Hi, I am aware that this is not a direct 'development' question but I need that info to test a development project, so I think someone could've hit similar problem. I will test a software that runs a TCP server and according to sent commands replies some answers. I will test the software and do not want to write code if it doesn't work well. So I want to send those commands and test drive the server software. How can I achieve this with a Linux box?

    Read the article

  • Close an external TCP connection

    - by oidfrosty
    How can i terminate a tcp connection wich is not handled by my program? for example i want to close all the connection on port 10202 and i dont want them to reopen but i want to allow the other ports everything in C# like Sysinternals' tcpView does

    Read the article

  • TCP Connection Persistent State

    - by TripShock
    Is there any field/option/anything that I can put in a TCP packet (be it a syn or an ack or just plain data) that I can be sure will be returned by the other end intact? For eg. I want to "tag" a particular connection (src, srcport, dst, dstport) with a number that I can always read from a packet belonging to that connection. That means I can identify the connection without using the 4-tuple (as given above).

    Read the article

  • Transmitting complex objects using TCP

    - by Rakesh K
    I have a client server application in which I need to transmit a user defined object from Client to Server using TCP connection. My object is of the following structure: class Conversation { private string convName, convOwner; public ArrayList convUsers; public string getConvName() { return this.convName; } public string getConvOwner() { return this.convOwner; } } Please help me how to transmit this object at from client and again de-serialize it into appropriate object at server side.

    Read the article

  • Cisco Pix 501 - reaching local host limit, showing odd IP addresses

    - by cdonner
    I am running out of licenses on my Pix 501, and the show local-host command lists a number of odd IP addresses that do not belong to my 10.10.1.* subnet. Any idea what they are? The only thing I could find was a potential ISP: DINSA is Defence Interoperable Network Services Authority, an agency of the Ministry of Defence of the United Kingdom. Does not sound right. I don't see any active connections, though. I can't ping or traceroute these IPs, but they reappear after I clear the list, with various other addresses in that general range, up until the connection limit is reached. Based on the number denied, I suppose I would have a lot more of them had I not the connection limit. Very dubious. Is anybody else seeing this? pixfirewall# show local-host Interface inside: 10 active, 10 maximum active, **118 denied** local host: <10.10.1.110>, TCP connection count/limit = 0/unlimited TCP embryonic count = 0 TCP intercept watermark = unlimited UDP connection count/limit = 0/unlimited AAA: Xlate(s): Conn(s): local host: <10.10.1.176>, TCP connection count/limit = 0/unlimited TCP embryonic count = 0 TCP intercept watermark = unlimited UDP connection count/limit = 0/unlimited AAA: Xlate(s): Conn(s): local host: <10.10.1.170>, TCP connection count/limit = 0/unlimited TCP embryonic count = 0 TCP intercept watermark = unlimited UDP connection count/limit = 1/unlimited AAA: Xlate(s): Conn(s): local host: <10.10.1.175>, TCP connection count/limit = 11/unlimited TCP embryonic count = 0 TCP intercept watermark = unlimited UDP connection count/limit = 1/unlimited AAA: Xlate(s): Conn(s): local host: <10.10.1.108>, TCP connection count/limit = 0/unlimited TCP embryonic count = 0 TCP intercept watermark = unlimited UDP connection count/limit = 0/unlimited AAA: Xlate(s): Conn(s): local host: <25.33.41.115>, // ???????????????? what is this? TCP connection count/limit = 0/unlimited TCP embryonic count = 0 TCP intercept watermark = unlimited UDP connection count/limit = 0/unlimited AAA: Xlate(s): Conn(s): local host: <25.33.226.124>, // ???????????????? what is this? TCP connection count/limit = 0/unlimited TCP embryonic count = 0 TCP intercept watermark = unlimited UDP connection count/limit = 0/unlimited AAA: Xlate(s): Conn(s): local host: <10.10.1.172>, TCP connection count/limit = 0/unlimited TCP embryonic count = 0 TCP intercept watermark = unlimited UDP connection count/limit = 0/unlimited AAA: Xlate(s): Conn(s): local host: <25.36.114.91>, // ???????????????? what is this? TCP connection count/limit = 0/unlimited TCP embryonic count = 0 TCP intercept watermark = unlimited UDP connection count/limit = 0/unlimited AAA: Xlate(s): Conn(s): local host: <10.10.1.109>, TCP connection count/limit = 0/unlimited TCP embryonic count = 0 TCP intercept watermark = unlimited UDP connection count/limit = 0/unlimited AAA: Xlate(s): Conn(s): pixfirewall#

    Read the article

  • What resources do you recommend for learning more about TCP/IP, networking, and related areas?

    - by mkelley33
    As a relatively-new Python programmer, I'm finding more and more that networking as it relates to the web and web development is becoming increasingly important to understand. When I was an active C# ASP.NET programmer making smaller websites with less responsibility this knowledge seemed less important, since there was often a "networking" guy performing any tasks beyond acquiring a domain name for a client. Which books, websites, presentations, articles, or other resources would you recommend so that I best understand what's happening between the time a user types a URL and receives the rendered HTML? Thanks!

    Read the article

  • iptables - quick safety eval & limit max conns over time

    - by Peter Hanneman
    Working on locking down a *nix server box with some fancy iptable(v1.4.4) rules. I'm approaching the matter with a "paranoid, everyone's out to get me" style, not necessarily because I expect the box to be a hacker magnet but rather just for the sake of learning iptables and *nix security more throughly. Everything is well commented - so if anyone sees something I missed please let me know! The *nat table's "--to-ports" point to the only ports with actively listening services. (aside from pings) Layer 2 apps listen exclusively on chmod'ed sockets bridged by one of the layer 1 daemons. Layers 3+ inherit from layer 2 in a similar fashion. The two lines giving me grief are commented out at the very bottom of the *filter rules. The first line runs fine but it's all or nothing. :) Many thanks, Peter H. *nat #Flush previous rules, chains and counters for the 'nat' table -F -X -Z #Redirect traffic to alternate internal ports -I PREROUTING --src 0/0 -p tcp --dport 80 -j REDIRECT --to-ports 8080 -I PREROUTING --src 0/0 -p tcp --dport 443 -j REDIRECT --to-ports 8443 -I PREROUTING --src 0/0 -p udp --dport 53 -j REDIRECT --to-ports 8053 -I PREROUTING --src 0/0 -p tcp --dport 9022 -j REDIRECT --to-ports 8022 COMMIT *filter #Flush previous settings, chains and counters for the 'filter' table -F -X -Z #Set default behavior for all connections and protocols -P INPUT DROP -P OUTPUT DROP -A FORWARD -j DROP #Only accept loopback traffic originating from the local NIC -A INPUT -i lo -j ACCEPT -A INPUT ! -i lo -d 127.0.0.0/8 -j DROP #Accept all outgoing non-fragmented traffic having a valid state -A OUTPUT ! -f -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT #Drop fragmented incoming packets (Not always malicious - acceptable for use now) -A INPUT -f -j DROP #Allow ping requests rate limited to one per second (burst ensures reliable results for high latency connections) -A INPUT -p icmp --icmp-type 8 -m limit --limit 1/sec --limit-burst 2 -j ACCEPT #Declaration of custom chains -N INSPECT_TCP_FLAGS -N INSPECT_STATE -N INSPECT #Drop incoming tcp connections with invalid tcp-flags -A INSPECT_TCP_FLAGS -p tcp --tcp-flags ALL ALL -j DROP -A INSPECT_TCP_FLAGS -p tcp --tcp-flags ALL NONE -j DROP -A INSPECT_TCP_FLAGS -p tcp --tcp-flags ACK,FIN FIN -j DROP -A INSPECT_TCP_FLAGS -p tcp --tcp-flags ACK,PSH PSH -j DROP -A INSPECT_TCP_FLAGS -p tcp --tcp-flags ACK,URG URG -j DROP -A INSPECT_TCP_FLAGS -p tcp --tcp-flags SYN,FIN SYN,FIN -j DROP -A INSPECT_TCP_FLAGS -p tcp --tcp-flags ALL FIN,PSH,URG -j DROP -A INSPECT_TCP_FLAGS -p tcp --tcp-flags FIN,RST FIN,RST -j DROP -A INSPECT_TCP_FLAGS -p tcp --tcp-flags SYN,RST SYN,RST -j DROP -A INSPECT_TCP_FLAGS -p tcp --tcp-flags ALL SYN,FIN,PSH,URG -j DROP -A INSPECT_TCP_FLAGS -p tcp --tcp-flags ALL SYN,RST,ACK,FIN,URG -j DROP #Accept incoming traffic having either an established or related state -A INSPECT_STATE -m state --state ESTABLISHED,RELATED -j ACCEPT #Drop new incoming tcp connections if they aren't SYN packets -A INSPECT_STATE -m state --state NEW -p tcp ! --syn -j DROP #Drop incoming traffic with invalid states -A INSPECT_STATE -m state --state INVALID -j DROP #INSPECT chain definition -A INSPECT -p tcp -j INSPECT_TCP_FLAGS -A INSPECT -j INSPECT_STATE #Route incoming traffic through the INSPECT chain -A INPUT -j INSPECT #Accept redirected HTTP traffic via HA reverse proxy -A INPUT -p tcp --dport 8080 -j ACCEPT #Accept redirected HTTPS traffic via STUNNEL SSH gateway (As well as tunneled HTTPS traffic destine for other services) -A INPUT -p tcp --dport 8443 -j ACCEPT #Accept redirected DNS traffic for NSD authoritative nameserver -A INPUT -p udp --dport 8053 -j ACCEPT #Accept redirected SSH traffic for OpenSSH server #Temp solution: -A INPUT -p tcp --dport 8022 -j ACCEPT #Ideal solution: #Limit new ssh connections to max 10 per 10 minutes while allowing an "unlimited" (or better reasonably limited?) number of established connections. #-A INPUT -p tcp --dport 8022 --state NEW,ESTABLISHED -m recent --set -j ACCEPT #-A INPUT -p tcp --dport 8022 --state NEW -m recent --update --seconds 600 --hitcount 11 -j DROP COMMIT *mangle #Flush previous rules, chains and counters in the 'mangle' table -F -X -Z COMMIT

    Read the article

  • Why does TCP sometimes not acknowledge the packets it receives?

    - by misteryes
    I use firefox to visit a web server running on a computer on my LAN. I notice that sometimes TCP doesn't acknowledge the packets it receives. For example, in the following captured packets: https://docs.google.com/file/d/0B-LaBUj9KtQhS0RYNXF1RjZTa2M/edit?usp=sharing the 7th 9th and 11th packets are duplicated ACK, the browser receives TCP packets 6,8 and 10, but the browser TCP stack doesn't acknowledge the received packets, why?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >