473,568 Members | 2,738 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

win32 socket, "Operation not supported"


Hello,

I have written an app which opens a TCP connection to a server and uses a protocol to communicate with it.
Specifically, I've written a python IMD client for the molecular dynamics application 'NAMD' (do searches for IMD and NAMD if you want to learn more).

The protocol is very simple: both ends of the TCP connection can send messages to the other side at any time; when data is
available on a read socket, a full packet (with known size) is read in a blocking fashion from the socket.

This is used, on the client side, to make requests of the molecular dynamics engine (such as "speed up", or "slow down", or "quit").
The server side periodically sends updates on the state of the molecular dynamics engine (current step, atomic coords, etc).

This all works fine on linux: I can connect, and send and receive messages as necessary.

However, on Windows, I can connect and complete the initial handshake, and receive periodic updates, but when I try to send a message
to the server, socket.send gets an "Operation not supported".

From my reading of the win32 docs, the socket send call returns this in a couple of situations:
when a two-way socket had one half shut down and the send would have used the shut down direction, or
when an out of band message was sent on a socket type which does not support it (such as UDP).

Neither of these situations are true. When I re-code the app in C, the problem doesn't occur. Anybody got some suggestions?
(PS: the socket I/O is set to blocking, and the Nagle algorithm is disabled).

Dave
Jul 18 '05 #1
2 3081
David wrote:
I have written an app which opens a TCP connection to a server and uses a protocol to communicate with it. Specifically, I've written a python IMD client for the molecular dynamics application 'NAMD' (do searches for IMD and NAMD if you want to learn more).

The protocol is very simple: both ends of the TCP connection can send messages to the other side at any time; when data is available on a read socket, a full packet (with known size) is read in a blocking fashion from the socket.

Are you doing a select or poll on the socket to ensure the read won't block?
(not relevent to your problem, just trying to understand your program)
However, on Windows, I can connect and complete the initial handshake, and receive periodic updates, but when I try tosend a message
to the server, socket.send gets an "Operation not supported".
From my reading of the win32 docs, the socket send call returns this in a
couple of situations: when a two-way socket had one half shut down and the send would have used the shut down direction, or when an out of band message was sent on a socket type which does not support it (such as UDP).
Neither of these situations are true. When I re-code the app in C, the problem doesn't occur. Anybody got some suggestions? (PS: the socket I/O is set to blocking, and the Nagle algorithm is disabled).


Could you send a stripped-down version of the Python code? If nothing else,
other Windows users can try it out too and report back their results.

-Dave
Jul 18 '05 #2
David Konerding <de*@compbio.be rkeley.edu> writes:
Hello,

I have written an app which opens a TCP connection to a server and
uses a protocol to communicate with it. Specifically, I've written a
python IMD client for the molecular dynamics application 'NAMD' (do
searches for IMD and NAMD if you want to learn more).

The protocol is very simple: both ends of the TCP connection can send
messages to the other side at any time; when data is available on a
read socket, a full packet (with known size) is read in a blocking
fashion from the socket.

This is used, on the client side, to make requests of the molecular
dynamics engine (such as "speed up", or "slow down", or "quit"). The
server side periodically sends updates on the state of the molecular
dynamics engine (current step, atomic coords, etc).

This all works fine on linux: I can connect, and send and receive
messages as necessary.

However, on Windows, I can connect and complete the initial handshake,
and receive periodic updates, but when I try to send a message to the
server, socket.send gets an "Operation not supported".

From my reading of the win32 docs, the socket send call returns this
in a couple of situations: when a two-way socket had one half shut
down and the send would have used the shut down direction, or when an
out of band message was sent on a socket type which does not support
it (such as UDP).

Neither of these situations are true. When I re-code the app in C,
the problem doesn't occur. Anybody got some suggestions? (PS: the
socket I/O is set to blocking, and the Nagle algorithm is disabled).


I have no idea, and if it works in C it should also work in Python ;-).

OTOH, the approach you take sounds a little strange - if you communicate
with fixed size packets wouldn't UDP datagrams fit better? This would
IIUC also remove the requirement to disable the nagle algo.

Thomas
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5269
by: Paul Moore | last post by:
I can't find anything which spells this out in the manuals. I guess that, at some level, the answer is "a single bytecode operation", but I'm not sure that explains it for me. This thought was triggered by a comment on the Python Cookbook site, which basically said that it was OK to do tss = {} ... id = thread.get_ident() tss = {}
1
4893
by: skilla | last post by:
Hi people, I've got WinXP Pro SP2 English on my laptop and since installing SP2 got the IISRESET "No such interface supported" error. The whole story: I was writing a fairly simple ASP app with in-memory recordsets, and while testing I issued an iisreset to get 'clean test results', but I got the "No such interface supported".
3
14717
by: Giulio | last post by:
I'm studying Craig Larman's "Applying uml and Patterns" (third ed.) reading at the book it seems (16.6) that Operations and Methods in a Class diagram are something different but it's not explained what's the difference. I always thought they were the same thing. Do someone knows what's the difference? thanx alot Giulio
3
10505
by: asd987 | last post by:
Hi, Can anyone tell me if "replace" is supported by Access 97? I use the Dutch version and get the errormessage "sub or function not supported". Or is the Professional Edition needed? Thanks.
1
2008
by: rmgalante | last post by:
I was wondering if anyone knows whether MS has a fix for the Menu Control. If the page is loading while you mouse over a menu control with child menus that pop out, you can generate the following error in IE. Internet Explorer cannot open the Internet site... http://www.... Operation aborted
11
1880
by: Bob Altman | last post by:
Hi all, I want to write a generic class that does this: Public Class X (Of T) Public Sub Method(param As T) dim x as T = param >3 End Sub End Class
7
4832
by: EManning | last post by:
Using A2003. I'm receiving this error when returning from a "DoCmd.OpenReport..." statement. I have a tab control with a subform on every tab. The user selects an item from a combobox at the top of the main form which refreshes all the subforms. If this DoCmd statement is not executed, then I don't receive the error. I tried a...
0
1657
by: kimiraikkonen | last post by:
Hello, I wanted query my CPU's temperature using this WMI code, but it always gives error "not suppored" as exception. I can monitor my Intel P4 Socket 478 CPU's temp with the softwares supplied by motherboard manufacturer or other 3rd party softwares, but cannot using that WMI code. What's wrong? And how could i make sure that my system...
1
3931
by: news.microsoft.com | last post by:
I am getting the following error on the return from a function call.It specically happens on the assignment of the return value from the function call. No error happens inside the function. The function is returning an Integer with a value of 1. Err.number =5 Err.Description=Operation is not supported on this platform....
0
7693
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7916
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8117
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7660
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6275
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2101
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.