Search Results

Search found 1582 results on 64 pages for 'packet'.

Page 45/64 | < Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >

  • Can Java ServerSocket and Sockets using ObjectIOStreams lose packets?

    - by Joel Garboden
    I'm using a ServerSocket on my server and Sockets that use ObjectIOStreams to send serializable objects over the network connection. I'm developing an essentially more financial version of monopoly and thus packets being sent and confirmed as sent/received is required. Do I need to implement my own packet loss watcher or is that already taken care of with (Server)Sockets? I'm primarily asking about losing packets during network blips or whatnot, not full connection error. E.g. siblings move a lead plate between my router and computer's wi-fi adapter. http://code.google.com/p/inequity/source/browse/#svn/trunk/src/network Code can be found under network-ClientController and network-Server

    Read the article

  • how to handle CONNECT http request

    - by davidshen84
    hi, i want to implement a simple web server for my self. i can handle GET and POST request now. but i have no idea what to do with CONNECT request. CONNECT request is send when the client is going to access a https site. according to http://muffin.doit.org/docs/rfc/tunneling_ssl.html, it says i should response '200 Connection established'. but i got 'A TLS packet with unexpected length was received' on the client. the wiki described about the ssl handshake protocol, but it did not mention how to implement it.

    Read the article

  • Prevent users from being able to access a webpage via web browser?

    - by Rob
    My friend and I are working on a program. This program is going to submit GET data to our webpage. However, we don't want users accessing the webpage any other way than the program. We can prevent users from sharing the program using HWID authentication, but nothing prevents them from using a packet scanner to get the URL of the webpage. We thought about user-agent authentication, which we will implement, but user-agents can easily be spoofed. So my question is, how can we prevent users from accessing the webpage directly, instead of through the program? Even if you don't have an answer that will completely work, anything that will help deter them would be nice. Currently we will be implementing: HWID Authentication to use the program User-Agent Authentication to access the web page Instant IP Blacklisting to anyone accessing the webpage without the proper User-Agent

    Read the article

  • How to pass data to another droid device when the other device isn't expecting it

    - by James Black
    I am working on an application and one feature that would make it really useful is the ability to share some information, but the other device may not be expecting the data to be sent. For example, if I am reading a really good book, and I realize that a friend may like it, I could use an application to send the data to him, so he could order the book from Amazon. But, since he isn't expecting the data, I would hate for the application to be polling a server every so often, as that will be needlessly draining the battery. Ideally it would be great if there was a way to make a phone call to the target device, send a data packet and end the call. If it could be done and prevent the phone from ringing, then it would be very useful to me. I am curious if there is some way to send data between devices without polling.

    Read the article

  • Java Socket fails to transmit data over the network

    - by Mark Griffin
    I'm experiencing a bizarre problem with sockets between a Java Knopflerfish client bundle and a PHP (CLI, not web) server. The client/server pair work fine when both are located on the localhost, and all data is transmitted successfully. However, when the Java client exists on a different machine, connections to the server are successful, but no data is received by the PHP script. Packet analysis confirms that the data sent by the Java client is received on by the server - PHP just seems to have problems getting its hands on it. As a further note, I've done some tests with telnet as the client. The PHP server script receives all data fine from any host. This leads me to believe that the problem has something to do with the way java is setting up the socket or that there is some networking issue that I'm not familiar with. Any thoughts would be appreciated. Can post code samples if desired.

    Read the article

  • apache front end using mod_proxy_ajp to tomcat on different servers

    - by user302307
    Anyone knows the steps to run Apache on server A as front end and run mod_proxy_ajp to connect to tomcat instances on server B? I want to run apache on sever A to do name based vhost that connects to many tomcat servers. I can run mod_proxy_ajp, only if apache and tomcat are on the same server. What I've tried so far: In server A, running Apache 2.2: NameVirtualHost *:80 ServerName tc0.domo.lan ErrorLog "C:\Apache\Apache2.2\logs\tc0.ajp.error.log" CustomLog "C:\Apache\Apache2.2\logs\tc0.ajp.access.log" combined DocumentRoot C:/htdocs0 AddDefaultCharset Off Order deny,allow Allow from all ProxyPass / ajp://192.168.77.233:8009/ ProxyPassReverse / ajp://192.168.77.233:8009/ Options FollowSymLinks AllowOverride None Order deny,allow Allow from all Server B: 192.168.77.233, tomcat 6 connector: I can confirm if going to http://192.168.77.233:8080/manager/html, tomcat works. When I use packet sniffer on server A, I found that server A is trying to connect to server B at port 80 when I'm connecting http://tc0.domo.lan/manager/html on server A

    Read the article

  • How to gain greater control of network packets on Android

    - by mauvehead
    I'm looking to design an application that will require some deep control over IP packets. Looking over the reference guide on the developers site at Android I see very limited control over packets from java.net:SocketOptions and java.net:DatagramPacket. Specifically I'm looking to control the individual bits within the packet to set TCP Flags, SYN/ACK/RST, and so forth. Based on the docs I am assuming I cannot do this within the Java API provided by Android and I'm guessing I'll have to do it some other way? Anyone have any insight on this?

    Read the article

  • .NET values lookup

    - by Maciej
    Hi, I have a feeling of missing something obvious. UDP receiver application. It holds a collection of valid UDP sender IPs - only guys with IP on that list will be considered. Since that list must be looked at on every packet and UDPs are so volatile, that operation must be maximum fast. Good choice is Dictionary but it is a key-value structure and what I actually need here is a dictionary-like (hash lookup) key only structure. Is there something like that? Small annoyance rather than a bug but still. I can still use Dictionary Thanks, M.

    Read the article

  • Function that copies into byte vector reverses values

    - by xeross
    Hey, I've written a function to copy any variable type into a byte vector, however whenever I insert something it gets inserted in reverse. Here's the code. template <class Type> void Packet::copyToByte(Type input, vector<uint8_t>&output) { copy((uint8_t*) &input, ((uint8_t*) &input) + sizeof(Type), back_inserter(output)); } Now whenever I add for example a uint16_t with the value 0x2f1f it gets inserted as 1f 2f instead of the expected 2f 1f. What am I doing wrong here ? Regards, Xeross

    Read the article

  • Unit testing UDP socket handling code

    - by JustJeff
    Are there any 'good' ways to cause a thread waiting on a recvfrom() call to become unblocked and return with an error? The motivation for this is to write unit tests for a system which includes a unit that reads UDP datagrams. One of the branches handles errors on the recvfrom call itself. The code isn't required to distinguish between different types of errors, it just has to set a flag. I've thought of closing the socket from another thread, or do a shutdown on it, to cause recvfrom to return with an error, but this seems a bit heavy handed. I've seen mention elsewhere that sending an over-sized packet would do it, and so set up an experiment where a 16K buffer was sent to a recvfrom waiting for just 4K, but that didn't result in an error. The recvfrom just return 4096, to indicate it had gotten that many bytes.

    Read the article

  • Excel data connection - remove header row?

    - by ekoner
    The excel spreadsheet is connecting to SQL server 2005 using the connection string below: Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=XXXXXX;Data Source=XXXXXX;Extended Properties="HDR=No";Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=XXXXXX;Use Encryption for Data=False;Tag with column collation when possible=False It then pulls data from a view into Excel. The business user wants this information without a header row. This will allow her to review then save as a "headless" csv in SAGE file format. I attempted to alter the connection string by adding HDR=No but that hasn't worked. Additionally, I can't delete the header row. Deleting the content replaces the column names with "Column 1" etc. Any ideas appreciated!

    Read the article

  • Building a webserver, client doesn't acknowledge HTTP 200 OK frame.

    - by Evert
    Hi there, I'm building my own webserver based on a tutorial. I have found a simple way to initiate a TCP connection and send one segment of http data (the webserver will run on a microcontroller, so it will be very small) Anyway, the following is the sequence I need to go through: receive SYN send SYN,ACK receive ACK (the connection is now established) receive ACK with HTTP GET command send ACK send FIN,ACK with HTTP data (e.g 200 OK) receive FIN,ACK <- I don't recieve this packet! send ACK Everything works fine until I send my acknowledgement and HTTP 200 OK message. The client won't send an acknowledgement to those two packages and thus no webpage is being displayed. I've added a pcap file of the sequence how I recorded it with wireshark. Pcap file: http://cl.ly/5f5 (now it's the right data) All sequence and acknowledgement numbers are correct, checksum are ok. Flags are also right. I have no idea what is going wrong.

    Read the article

  • How to implement blocking request-reply using Java concurrency primitives?

    - by Uri
    My system consists of a "proxy" class that receives "request" packets, marshals them and sends them over the network to a server, which unmarshals them, processes, and returns some "response packet". My "submit" method on the proxy side should block until a reply is received to the request (packets have ids for identification and referencing purposes) or until a timeout is reached. If I was building this in early versions of Java, I would likely implement in my proxy a collection of "pending messages ids", where I would submit a message, and wait() on the corresponding id (with a timeout). When a reply was received, the handling thread would notify() on the corresponding id. Is there a better way to achieve this using an existing library class, perhaps in java.util.concurrency? If I went with the solution described above, what is the correct way to deal with the potential race condition where a reply arrives before wait() is invoked?

    Read the article

  • Writing email sniffer

    - by Rampage
    Hello, I am interested in writing an email sniffer that saves all emails sent via web based clients to hd, but I can't work out how to do this. How can I catch HTTPS mail before it is encrypted? I would really appriciate some useful info. I cannot find anything information on the web. There's a program called HTTP Analyzer V5 that does the exact thing I want to make. How should I start? If I make a packet sniffer, it's useless because all data is encrypted. Is there any other option?

    Read the article

  • Invalidating session before iPhone application quits

    - by tartox
    Hello I would like to tell the server to invalidate an ongoing session when the user quits the iPhone application. In the app delegate, I send a request to the server in the (void)applicationWillTerminate:(UIApplication *)application method. I am not waiting for a server answer, I just want to send the request and quit. However I cant see any packet leaving the application. The same code in another place works fine. Session has a limited duration anyway and the server will invalidate it after a while, but I would prefer to do it nicely when leaving application. Is it normal that no NSURLConnection can be established from the applicationWillTerminate method ? Thank you.

    Read the article

  • C# Socket Server

    - by Snoopy
    In .NET 3.5 a new socket classes was released: http://msdn.microsoft.com/en-us/library/bb968780.aspx i found a sample but some questions regarding best practicses are remaining: http://code.msdn.microsoft.com/nclsamples/Wiki/View.aspx?title=Socket%20Performance m_numConnections (the maximum number of connections the sample is designed to handle simultaneously) is probably equal to the amount of cpu cores i have. m_receiveBufferSize is the size for one packet? like 8kb? how should i handle a length byte? opsToPreAlloc i dont understand. is this if i code a transparent proxy? Regarding the multithreading, what should be used? The reactive extension seem to be a good choice. Has anyone tried this in a real world project? Are there better options? I had bad experiences with the .NET thread pool in the past.

    Read the article

  • How to recive more than 65000 bytes in C++ socket using recv()

    - by Mr.Cool
    I am developing a client server application (TCP) in Linux using C++. I want to send more than 65,000 bytes at the same time. In TCP, the maximum packet size is 65,635 bytes only. How can I send the entire bytes without loss? Following is my code at server side. //Receive the message from client socket if((iByteCount = recv(GetSocketId(), buffer, MAXRECV, MSG_WAITALL)) > 0) { printf("\n Received bytes %d\n", iByteCount); SetReceivedMessage(buffer); return LS_RESULT_OK; } If I use MSG_WAITALL it takes a long time to receive the bytes so how can I set the flag to receive more than 10 lakhs bytes at time.

    Read the article

  • Threading and pcap issues.

    - by cftmon
    I have a GUI program that allows a user a scan a network, the issue is that when the pcap_loop function is called, my GUI program becomes unresponsive.(the pcap_loop blocks the current thread). When i try to use pthreads, i got a SIGSEGV fault at the pcap_loop function.Why?It's as if the thread can't see the procPacket function itself. void procPacket(u_char *arg, const struct pcap_pkthdr *pkthdr, const u_char *packet) { //show packets here } void* pcapLooper(void* param) { pcap_t* handler = (pcap_t*) param; pcap_loop(handler, 900 ,procPacket, NULL ); } //some function that runs when a button is pressed //handler has been opened through pcap_open_live pthread_t scanner; int t = pthread_create(&scanner,NULL,&pcapLooper, &handler ); if(t) { std::cout << "failed" << std::endl; } pthread_join(scanner,NULL); //do other stuff.

    Read the article

  • Are there any modern platforms with non-IEEE C/C++ float formats?

    - by Patrick Niedzielski
    Hi all, I am writing a video game, Humm and Strumm, which requires a network component in its game engine. I can deal with differences in endianness easily, but I have hit a wall in attempting to deal with possible float memory formats. I know that modern computers have all a standard integer format, but I have heard that they may not all use the IEEE standard for floating-point integers. Is this true? While certainly I could just output it as a character string into each packet, I would still have to convert to a "well-known format" of each client, regardless of the platform. The standard printf() and atod() would be inadequate. Please note, because this game is a Free/Open Source Software program that will run on GNU/Linux, *BSD, and Microsoft Windows, I cannot use any proprietary solutions, nor any single-platform solutions. Cheers, Patrick

    Read the article

  • MSCRYPTO: How to import RSA key from pkcs#12 into Microsoft Enhanced RSA and AES CSP?

    - by lsh123
    According to the MSDN (http://msdn.microsoft.com/en-us/library/aa387314%28v=VS.85%29.aspx) the PFXImportCertStore function imports the cert/key into Base CSP (MS_STRONG_PROV) or Enhanced CSP (MS_ENHANCED_PROV). However, to use RSA/SHA2 signatures, I need to import the key into the Enhanced RSA and AES CSP (MS_ENH_RSA_AES_PROV) and I can't find a way to do it. The documentation mentions "provider name" from the PFX packet, but I can't find any way to set it for a pkcs12 file generated by a 3rd party (e.g. OpenSSL). Thank you in advance.

    Read the article

  • Why are nanosleep() and usleep() too slow?

    - by user351990
    I have a program that generates packets to send to a receiver. I need an efficient method of introducing a small delay between the sending of each packet so as not to overrun the receiver. I've tried usleep() and nanosleep() but they seem to be too slow. I've implemented a busy wait loop and had more success, but it's not the most efficient method, I know. I'm interested in anyone's experiences in trying to do what I'm doing. Do others find usleep() and nanosleep() to function well for this type of application? Thanks, Danny Llewallyn

    Read the article

  • Create multiple TCP Connections in C# then wait for data

    - by Ryan French
    Hi Everyone, I am currently creating a Windows Service that will create TCP connections to multiple machines (same socket on all machines) and then listen for 'events' from those machines. I am attempting to write the code to create a connection and then spawn a thread that listens to the connection waiting for packets from the machine, then decode the packets that come through, and call a function depending on the payload of the packet. The problem is I'm not entirely sure how to do that in C#. Does anyone have any helpful suggestions or links that might help me do this? Thanks in advance for any help!

    Read the article

  • C# socket blocking behavior

    - by Gearoid Murphy
    My situation is this : I have a C# tcp socket through which I receive structured messages consisting of a 3 byte header and a variable size payload. The tcp data is routed through a network of tunnels and is occasionally susceptible to fragmentation. The solution to this is to perform a blocking read of 3 bytes for the header and a blocking read of N bytes for the variable size payload (the value of N is in the header). The problem I'm experiencing is that occasionally, the blocking receive operation returns a partial packet. That is, it reads a volume of bytes less than the number I explicitly set in the receive call. After some debugging, it appears that the number of bytes it returns is equal to the number of bytes in the Available property of the socket before the receive op. This behavior is contrary to my expectation. If the socket is blocking and I explicitly set the number of bytes to receive, shouldn't the socket block until it recv's those bytes?, any help, pointers, etc would be much appreciated.

    Read the article

  • What software design pattern is best for the following scenario (C#)

    - by askjdh
    I have a gps device that records data e.g. datetime, latitude, longitude I have an sdk that reads the data from the device. The way the data is read: A command packet (basically a combination of int values in a struct) is sent to the device. The device responds with the data in fixed size chunks e.g. 64bytes Depending on the command issued I will get back differect data structs e.g. sending command 1 to the device returns a struct like struct x { id int, name char[20] } command 2 returns a collection of the following structs (basically it boils down to an array of the structs - y[12]) struct y { date datetime, lat decimal, lon decimal } I would then want to convert the struct to a class and save the data to a database. What would be the best way to encapsulate the entire process, preferably using some established design pattern? Many thanks M

    Read the article

  • MySQL PHP incompatibility.

    - by Evernoob
    Ok maybe I've overlooked something really simple here, but I can't seem to figure this out. I'm running WAMP locally, but connecting to a remote MySQL database. The local version of PHP is the latest 5.3.0. One of the remote databases, being version 5.0.45 works fine. However, the other remote database I'm trying to connect to, which is version 5.0.22 throws the following error before dying: Warning: mysql_connect() [function.mysql-connect]: OK packet 6 bytes shorter than expected. PID=5880 in ... Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using old authentication in ... WTF? UPDATE: Reverting to PHP 5.2.* i.e. anything lower than 5.3.0 resolves the problem completely. As long as I am not running 5.3.0 I can connect to both databases. I'm not sure what the explanation is for this weirdness.

    Read the article

< Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >