Winsocket???

Hello Class,
I got a question from my supervisor whose solution can not be found out by myself :-(
Below is the msg I got from him,
"Can you find out whether Labview supports something called "Winsocket"
If it does, it will ultimately be possible to control the detector
software from the 2nd computer."
Do you have any sort of idea about what winsocket is and whether we are able to reach winsocket in labview? If you know, please do me a favor. Thanks.
Best,
Fan
Fan Zhang
Dept of Physics and Astronomy
University of Pennsylvania
-----" A journey of a thousand miles must begin with a single step."

"Fan Zhang" schrieb im Newsbeitrag
news:8s55cf$cu1$[email protected]..
I think your supervisor would like to use TCP/IP for accessing some detector
hardware. winsocket is the TCP/IP stack of M$ Wind**s. Labview has a built
in TCP/IP stack or it is using winsockets. I don't know. But it is possible
to access devices or other computers by tcp/ip.
You can also write a dynamic link library, which uses winsockets. You can
then use this dll for accessing your hardware or computers.
I also use this for accessing high voltage supplies in a particle physic
experiment.
Torge Szczepanek [email protected] http://www.szczepanek.de/

Similar Messages

  • Found a fix for iTunes 10.6.1 store and connection issues

    Been having trouble for months not being able to connect to the store and then after the most recent update couldn't even connect to the internet to import a physical CD (wouldn't connect to Gracenotes), import purchases I made on my phone or even to check for iTunes updaes.  After reading some other posts about the winsocket concerns I ran a diagnostic and found a real player file called speedster used to enhance download speed using the winsocket.  I just uninstalled realplayer (I did have real player plus btw) and BAM all issues with iTunes were fixed.  Opened iTunes, store loaded and all my purchases from my iphone and ipod touch started downloading.  Simple, but ridiculous it caused that much trouble and not been an update to fix it yet seeing months of problems out there.

    Ha! Issue solved. The track not showing the arrows was a PDF in iTunes. All is well.

  • Why does StreamSocket::ConnectAsync set up two TCP connections when proxy is configured in system?

    Hello, Dear all,
    Per my test, the proxy for HTTPS will be selected as the actual used one for the out-going packets if we do the following test in an corporate network environment. Two connections will be set up: one is with the proxy, the other one is with the target address.
    Some info about my env:
    1. the configured proxy could only be accessed in the corporate network;
    2. the target host has both private and public IPs;
    3. I don't check whether there is proxy configured in code.
    4. the issue could only occurr in the private network; If I do the test out of the corporate network, the behavior is correct because no proxy is configured. But I am not sure whether the issue would occur if there would be a usable proxy configured.
    The repro steps are:
    1. Create a Windows Store App project with VS2013. The testing code is pretty simple as the following:
    using namespace Windows::Networking::Sockets;
    StreamSocket^ streamSock = ref new StreamSocket();
    IAsyncAction ^sconn = streamSock->ConnectAsync(
    ref new Windows::Networking::HostName("10.1.2.3"), "56789",
    SocketProtectionLevel::PlainSocket);
    The target address and port (10.1.2.3:56789) could be any meaningful or bad one. We only need to observe the packet sent out from the client side in the following steps.
    2. Configure the proxy in Internet Options -> Connections -> LAN Settings -> Advanced -> Secure. Give a good proxy/port to it;
    2.1. Run the program and capturing the packet from Wireshark or other tools.
       ==> You will see that a HTTP request with header "CONNECT" is sent to the proxy. That's to say, the client will connect to the proxy.
       ==> You will also see that the client side also sent out a TCP SYN packet to the remote target address (10.1.2.3:56789).
    3. Disable or remove the proxy setting;
    3.1. Run the program and capturing the packet from Wireshark or other tools.
       ==> You will see that there would be no HTTP request sent out.
    I am using Win8.1/VS2013 and the system is up-to-date... I am not sure the behavior is designed as this, or it is a bug of the StreamSocket?
    BTW: I didn't use Windows::Networking::Connectivity::NetworkInformation::GetProxyConfigurationAsync on purpose.
    For the classical WinSock, we could only see the TCP SYN packet in step 2. That's to say, the behaviors between StreamSocket and WinSocket are different.
    Thank you all.

    A workaround to avoid proxy connection requests from being sent out is to use the
    ConnectAsync(Hostname, String, SocketProtectionLevel,
    NetworkAdapter) method with a specific adapter. The proxy-related logic is disabled when a specific network adapter is selected.
    You can retrieve the main active network adapter by calling GetInternetConnectionProfile() and then referencing the NetworkAdapter property of the returned information:
    ConnectionProfile^ connectionProfile = NetworkInformation::GetInternetConnectionProfile();
    NetworkAdapter^ adapter = connectionProfile->NetworkAdapter;
    You could also enumerate all possible adapters and try to connect on each of them, one by one:
    for each (HostName^ localHostInfo in NetworkInformation::GetHostNames())
    if (localHostInfo->IPInformation != nullptr)
    NetworkAdapter^ adapter = localHostInfo->IPInformation->NetworkAdapter;
    // Attempt to connect with this adapter.

  • SocketExceptopn: Socket Operation on nonsocket: JVM_Bind - what ?

    Hi,
    I'm a new Java-application developer. I'm stadying Java at university in Kassel (germany) an now in university holiday I wnat to development a little messanging tool. So I have tried some basic technics.... but the simplesed things won't work!
    I've wrote this code:
    import java.net.*;
    import java.io.*;
    class MulClient
    public static void main( String args[] ) throws IOException
    Socket server = new Socket("localhost", 450 );
    But if I complie the code an run it....the JVM throws an Exception:
    Exception in thread "main" java.net.SocketException: Socket operation on nonsocket: JVM_Bind
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
    at java.net.Socket.bind(Socket.java:553)
    at java.net.Socket.<init>(Socket.java:363)
    at java.net.Socket.<init>(Socket.java:178)
    at MulClient.main(MulClient.java:8)
    I'm using windows xp Sp1 an a firewall (kerio personal firewall), ie 6 sp1....I'm behind a router but protocolls such as TCP/ip are installed..of course....
    Excause me bad english.....
    Thanks!
    Faithfully MrSandman

    Hi,
    1) You haven't created a ServerSocket so nothing's
    listening on that port. I doubt this is it, as it
    would probabl time out.If I start the server class-file (changed port 1044):
    import java.net.*;
    import java.io.*;
    public class MulServer
      public static void main( String args[] ) throws IOException
        ServerSocket server = new ServerSocket( 1044 );
         while ( true )
          Socket client = server.accept();
          InputStream  in  = client.getInputStream();
          OutputStream out = client.getOutputStream();
          int start = in.read();
          int end = in.read();
          int result = start * end;
          out.write( result );
          client.close();
    }the same exception appears. So there can't be a server listining on that port. But why doesn't this work?
    on MS developers page the exception or winsocket error is explained:
    "An operation was attempted on something that is not a socket. Either the socket handle parameter did not reference a valid socket, or for select, a member of an fd_set was not valid."
    But I don't understand; what does this mean?
    2) There is a server/listener type dealy bound to
    that port, but it's a FIFO or named pipe or
    something, rather than a Socket.What? do you think there is another application running on that port. There isn't anyone.
    I can't believe. I've tried another network-sample file taken from an internet tutorial...(I thought...this should work...) but the same exception....
    Any ideas? Please help!
    Thanks MrSandman

  • Newbie Question : Broken Pipe

    Hi all,
    I got a prob under Apache tomcat 5.5.6 and JDK & JRE 1.5.0_01:
    From catalina.out, I got :
    ==========================================================
    INFO: SessionListener: attributeAdded('D57CF5B49544DEE007778BB3F78EB407', 'cart', 'WebBlaBla.Main.MainModuleServlet@1fa1bb6')
    processRequest submit = : login
    java.net.SocketException: Broken pipe
    processRequest submit = : login
    processRequest submit = : login
    processRequest submit = : refresh
    processRequest submit = : refresh
    processRequest submit = : refresh
    processRequest submit = : refresh
    java.net.SocketException: Broken pipe
    processRequest submit = : refresh
    CheckWebClient execute
    checkWebClientConnexion ------>>>> 1105547298096
    1990>20000
    java.net.SocketException: Broken pipe
    processRequest submit = : refresh
    processRequest submit = : refresh
    java.net.SocketException: Broken pipe
    processRequest submit = : refresh
    processRequest submit = : refresh
    processRequest submit = : refresh
    ===========================================================
    I have no idea of what happening ..... if some one has ....
    Cheers,
    Fell

    can you give me more details about this.
    like what u were doing when this happened etc.Hi,
    On the server (Debian R3 and Tomcat 5.5.6), there's a java application running. This application is supposed to connect to a C++ server application througt a socket connection (winsocket).
    It cannot established this connection.
    This connection is ok under Windows XP , Mandrake 10.1 and Apache Tomcat 5.5.4.
    Sometime under Mandrake, we had the same problem "broken pipe" but the connection could be reestablished.
    Thx

  • Batch Import Error

    Hello
    We are testing a batch load process. When the load volume is small - 10-100 records the is no issue, but when we increase the load volume to 10,000 we recieve the follow failure.
    >Unable to synchronize family tree: The MDM server is not running.
    With the import map we are using we have set the configuration option:
    Synchronize Family Hierarchy after Import = No but still recieve the about error.
    When we set option to Yes the Import manager will crash with a WinSocket error
    Any suggestions as what this problem might be?
    Rgs
    C

    This is probably due to the load in the MDM Server.
    We have seen several times, that the MDM Server goes down, if the load in the server increases dramatically.
    Please check if your MDM Server is sized properly.
    Moreover, Import Manager uses the memory of the machine where it is running.
    As a side note, please check the user running the Import Manager, does not have any Security Constraints set in the Console. The user should have write access to the Family Hierarchy if the Synchronize Family Hierarchy after Import option is set to Yes.
    If the problem persists, you may try loading the hierarchy table first,
    This way you avoid creating nodes in the hierarchy tree on the fly when you create the main table records.
    First load the Hierarchy table, with Synchronize Option set to Yes.
    Then load the Main table records. Do the field and value mapping to the already created leaf nodes of the Hierarchy table.

  • I Can´t conect to iTunes Store: error del vinculo seguro a iTunes Store

    Some body Help, i try everything that the iTunes Help told me, but nothing happends

    Allready hae the solution, thanx
    winsocket reset

  • CWCS web page down

    My CWCS web page went down. I don't think its a DNS problem. I can do a NSlookup and it works.
    two events in my event viewer
    1.)
    Apache service named reports the following error: Disabled use of AcceptEX() WinSocket 2 API
    2.)
    The System failed to register host (A) resource records (RRs) for network adapter with settings:
    Adapter name: ...........
    Host Name : CWCS1
    Primary Domain suffix: domain.com
        172.16.5.200
    sent update to server: <?
    Anyone have an idea of how I can fix this?

    Hi, Is that a WCS running on Windows?
    What is the status of the service:
    Wireless Control System
    NMS-Apache

  • Getting 16 bit app communicating with 32 bit Labwindows app

    Hello,
    I am working with a 16 bit application written in Turbo Pascal.  I want to upgrade this code so that it communicates over a USB port rather than through an interrupt driven DMA process involving a card that sits on an ISA slot.  I'm interested in using a winsocket to allow the 16 bit application to communicate with a 32 bit Labwindows app.  Does anyone have more information on this topic and/or examples of how I can do this using LabWindows/CVI?
    Thanks,
    JLahens

    Hello JLahens,
    I haven't specifically done this myself, but I did a few Google
    searches and found some MSDN documentation that might be helpful to you
    even though it's ODBC related.
    What is "Thunking" and What Role Does it Play in CVI's 32-bit Environment, or in General?
    MSDN: Using 16-bit Applications with 32-bit Drivers
    Hope that helps, and if anyone else has additional info, please feel free to post.
    Thanks
    Wendy L
    LabWindows/CVI Developer Newsletter - ni.com/cvinews

  • Can I close the connection after sending immediately on the server?

    I have a C/S program. On the server side, the process as following:
    1. accept (blocking)
    2. //a connection is established
    using a new socket to receive request data from client
    3. business processing ... (maybe several seconds)
    4. send response data to client
    5. close socket immediately
    6. listening continuely again
    The server side is running on linux and writed by Java, and client is running on windows and writed by C++ Builder.
    My problem is:
    1. if the server is running on windows, everything is OK.
    2. if the server is running on linux (that is exprcted), the client can not receive the response data from server, the client program said the connection is unavailable when he read from socket blockingly.
    3. if I add some delay, e.g. 500ms, between sending response and close the connection, the client can receive response normally.
    why above?
    thanks for help.
    Jack

    Sorry, long time to go away.
    package test.server;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.net.ServerSocket;
    import java.net.Socket;
    public class EchoServer {
         private int port; // listened port
         private ServerSocket ssock; // the server's ip
         public EchoServer(String host, int port) {
              this.port = port;
              // Create a ServerSocket
              try {
                   ssock = new ServerSocket(port);
                   SocketAddress addr = new InetSocketAddress(host, port);
                   ssock.bind(addr);
              } catch (Exception ex) {
                   ex.printStackTrace();
              new HandleThread().start();
         public class HandleThread extends Thread {
              public int ntohl(byte[] bytes, int offset) {
                   int length1 = ((((int) bytes[offset + 0]) << 24) & 0xff000000);
                   int length2 = ((((int) bytes[offset + 1]) << 16) & 0x00ff0000);
                   int length3 = ((((int) bytes[offset + 2]) << 8) & 0x0000ff00);
                   int length4 = ((((int) bytes[offset + 3]) << 0) & 0x000000ff);
                   return length1 + length2 + length3 + length4;
              public void run() {
                   InputStream in = null;
                   OutputStream out = null;
                   try {
                        while (true) {
                             System.out.println("Start Listening...  [" + port + "]");
                             Socket clisock = ssock.accept();
                             //clisock.setSoLinger(true, 1);
                             System.out.println( "SOLinger:" + clisock.getSoLinger());
                             try {
                                  System.out.println("Accepted Client Socket...  [" + clisock + "]");
                                  in = clisock.getInputStream();
                                  out = clisock.getOutputStream();
                                  // receive four bytes length
                                  byte[] lenbuff = new byte[4];
                                  in.read(lenbuff, 0, 4);
                                  int len = ntohl(lenbuff, 0);
                                  byte[] buff = new byte[len];
                                  in.read(buff, 0, len);
                                  System.out.println("Received length&#65306;" + len + "  " + new String(buff));
                                  Thread.sleep(1000);
                                  out.write(lenbuff);
                                  out.write(buff);
                                  out.flush();
                                  //Thread.sleep(500);
                                  System.out.println("Send finished&#12290;");
                             } catch (Exception ex) {
                                  ex.printStackTrace();
                             } finally {
                                  if (in != null) {
                                       try {
                                            in.close();
                                       } catch (Exception ex) {
                                  if (out != null) {
                                       try {
                                            out.close();
                                       } catch (Exception ex) {
                                  if (clisock != null) {
                                       try {
                                            long time00 = System.currentTimeMillis();
                                            clisock.close();
                                            System.out.println( "close socket&#65306;[" + (System.currentTimeMillis() - time00) + "]");
                                       } catch (Exception ex) {
                   } catch (Exception ex) {
                        ex.printStackTrace();
         public static void main(String[] args) throws Exception {
              if( args.length == 2 ) {
                   new EchoServer(args[0], Integer.parseInt(args[1]));
              } else if( args.length == 2 ) {
                   new EchoServer("127.0.0.1", Integer.parseInt(args[0]));
              } else {
                   new EchoServer("127.0.0.1", 16000);
    }In my application, the package is following:
    length(4bytes) + data
    I have a simple WinSocket Client, send data to this server and receive the response,the sending is OK, Server can receive all messages.But when client is ready to receive data, the winsock call return WSAECONNRESET(10054).
    If I uncomment "Thread.sleep(500);", it means wait some time before close socket, the client can receive all response data.
    why?

  • Need help with Security when running AS3 inside browser

    Hi,
    I am fairly new to flash, but a fairly experienced
    programmer.
    I have created a game that runs perfectly and communicates to
    a WinSock server over port 4000 to publish its final score to.
    Using simple XMLSocket and Send.
    When I run the game in the standalone flash player everything
    works perfectly as it should
    However when I embed in a HTML page or similar it goes wrong.
    The game works fine, but the final posting to the WinSock socket
    server fails. I have retrieved the error message.
    ioErrorHandler: [SecurityErrorEvent type="securityError"
    bubbles=false cancelable=false eventPhase=2 text="Error #2048"]
    My server is a local server to me running IIS 6. Everything
    runs fine by the standalone flash player so I know ports are clear
    and firewalls are not the problem.
    Searching around google and forums I have found out that in
    9,0,124,0 (the flash I am running) that they made some security
    enhancements, namely you need to post a crossdomain file.
    My file is sat in the wwwroot of my webserver where my flash
    swf is hosted and looks like
    <cross-domain-policy>
    <allow-access-from domain="*" secure="false"/>
    </cross-domain-policy>
    I have also tried adding the following to the 1st section of
    the swf file
    Security.loadPolicyFile("
    http://mydomainname.com/crossdomain.xml");
    I have tried all conbinations, but I cannot get the flash to
    communicate to the socket server when it inside a web browser.
    If i run it in the standalone player, everything works
    perfectly.
    Can someone help me please. I have been googling and ripping
    my hair out for ages. This is the final stage of my project and I
    am failing at the final step.
    Just to add.
    My server and testing computer are on the same domain, the
    web server is a win2003 server and my testing and coding server is
    a XP machine running IE7. They are linked by a ADSL router sharing
    the same external IP address but via DHCP addressing. Everything
    works fine for port forwarding of the winsocket port.
    Just to emphasis, I believe this setup is correct, as it all
    works fine when I run in the flash player.
    Many thanks

    I fixed it eventually.
    In flash 9.0.124.0 they now force you to have a socket XML
    server running on port 843 a server somewhere if you wish to use
    XMLSocket inside a browser.
    Nothing to do with domain or crossdomain.xml files.
    You need to also call
    Security.loadPolicyFile("xmlsocket://x.x.x.x:843") before you
    open the socket.
    to load in the XML that defines what is allowed.
    Search google for AS3 and socket server port 843 and you will
    find examples and even a simple Java based server to use.

  • SMTP Error after Building EXE

    After working on this for a few hours, I give up. I'm trying to send an email when an item errors. I am able to get my code to run fine when it's a VI, but when it's an EXE, I get the following error:
    Error calling method System.Net.Mail.SmtpClient.Send of ObjectId handle: 0xA971168 for obj 0x30E9943[System.Net.Mail.SmtpClient] in domain [Application.exe for Run] and thread 8748, (System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
     Inner Exception: System.Net.Mail.SmtpException: Failure sending mail.
     Inner Exception: System.Net.WebException: Unable to connect to the remote server
     Inner Exception: System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions 10.80.4.119:25
    ) in testEmailVI.vi
    I've traced the issues to SMTP Client Send. Any ideas of what might be going wrong? I'm including my project and exe.
    Thanks in advance!!
    Attachments:
    SMTPTestVI.zip ‏167 KB

    As already mentioned you have to allow TCP access for you application in the Windows Firewall (or whatever you use in it's place). By default Windows Firewall blocks all network access for an executable and should show a dialog the first time you run the executable. If you happen to be a fast clicker who dismisses any and all dialog boxes without really reading them you easily can end up telling Windows Firewall to block your executable from accessing the network.
    It doesn't matter if you do the network communication through .Net, WinSockets or whatever else network API, as the Firewall hooks into the lowest level socket interface and blocks based on executable, not used interface.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Datasocket connection check

    Hello,
    I have created a simple application that reads datasockets from datasocket server using Measurement Studio for C++. Here is the piece of my code:
    code DSRead::Connect(char* url)
    m_DataSocket.InstallEventHandler(*this, &DSRead:ataUpdatedEventHandler);
    m_DataSocket.InstallEventHandler (*this, &DSRead:tatusUpdatedEventHandler);
    CNiString targetURL = url; 
    m_DataSocket.Connect(targetURL, CNiDataSocket::ReadAutoUpdate);
    MSG msg; 
    do
    while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
    TranslateMessage(&msg);
    DispatchMessage(&msg);
    connectionStatus = m_DataSocket.Status;
    while ((connectionStatus != CNiDataSocket::ConnectionError)
    && (connectionStatus != CNiDataSocket::Unconnected));
    if (connectionStatus == CNiDataSocket::ConnectionError)
    return CONNECTIONERROR;
    return OK;
    In DataUpdatedEventHandler function I process received data.
    The do-while construction is used because the CNiDataSocket Connect function requires that application processes Windows messages while the DataSocket is connecting (as is explained in this post).
    This works fine while connection to the datasocket server is alive. However, when connection is lost, nothing is changed. I mean,  m_DataSocket.IsConnected() is still true and connectionStatus is still CNiDataSocket::ConnectionActive. Moreover, if connection to DataSocket server reappears, the data is still not retrieved. 
    The question is: How can loss of connection be detected in this case?
    I have a feeling, that some windows functions should be used, but I failed to find answer in internet.

    Hi Josh,
    Thank you for the reply. These two links, as far as I understand, are about Windows socket connection issue rather than DataSocket connection issue. Of course, one solution to this problem is to periodically send winsocket echo requests to DS server, but I believe it is not the optimal one.
    Probably I have explained the problem ambiguously.
    I will try to explain again, taking as an example "Simple DataSocket" project from "Visual C++ Examples" of Measurement Studio. In this example there are 3 actors: Writer, DS Server and Reader. I have a virtual machine which is connected to host in "host only" mode and has ip address 192.168.7.29. The only thing I change in the code of "Simple DataSocket" example is url: I change "dstp://localhost/wave" to "dstp://192.168.7.29?/wave" for both Reader and Writer.
    Then I launch Reader and Writer in 2 scenarios:
    1) I launch Writer, DS Server and Reader on virtual machine. Reader and Writer operate successfully: Writer writes data to DS server, Reader reads data. Both statuses are "Active:Connected".
    Then I disable network adapter of virtual machine. As is expected, we have an error both for Writer and Reader:
    2) I launch Writer and DS Server on virtual machine, and I launch Reader on the host. Reader and Writer also operate successfully: statuses are "Active:Connected". But if I disable network adapter of virtual machine, then the situation is different from first scenario:
    I.e., Writer detects network disconnection, while Reader is still "Active:Connected", while really it isn't. As I have already written, m_DataSocket.IsConnected() property is also true.
    The similar problem arises even if there is no virtual machine: when Writer and DS Server are on host A and Reader is in host B and if I unplug network cable for host A. Then again Reader cannot detect connection fail.
    Basically the question is: how automatically it is possible to detect fail of connection in such situations?
    I will explain why I ask this question. I have a simulation program that generates data and publishs it to DS Server (both are located on virtual machine). I also have Reader application located on host. I simulate network fail by disabling network adapter for virtual machine. I want Reader to automatically detect network fail and generate an error. As I have explained above, currently Reader does not detect it.

Maybe you are looking for