Winsock

I have two questions:
1. Java use socket mechanism to form a connection.Is Java has its own connection
mechanism beneath socket or it calls the API from operating systems?
2. When in Windows OS, can a Java program know the exact connection error type from the Exception it got? I know when use C, the exact error type can be retrive
from Winsock mechanism.

1. Java use socket mechanism to form a connection.Is
Java has its own connection
mechanism beneath socket or it calls the API from
operating systems?It uses the API of the OS. (Or, at least the sun implementation of Java for winblows)
2. When in Windows OS, can a Java program know the
exact connection error type from the Exception it got?The winsock error code may be included in the string representation of the exception but that shouldn't be trusted (and it would be very OS specific).
If you need to find out the error code you should rather use C... The Java Native Interface (JNI) lets you mix C and Java if that's what you need to do.

Similar Messages

  • How do I use WINSOCK with VB6 to communicat​e with a Fieldpoint FP-1600 module ?

    I have a Fieldpoint system connected via a FP-1600 ethernet module to our local network. I can use CWDataSocket with Visual Basic 6 (under WinNT 4) to communicate with the fieldpoint hardware via the fieldpoint explorer and OPC server. But if I try to read multiple channels from say an analog input module, only one reading is returned (i.e. a single float).
    It would appear that in order to read multiple channel simultaneously, I need to by-pass the OPC server and communicate directly with the FP-1600. The FP100x programmers manual explains what commands to use and what responses to expect etc. There are also exampls on the NI web site using the MSComm VB control to co
    mmunicate with fieldpoint RS232 comm modules. But can't find anything that specifies how to configure the WINSOCK conection in order to achieve communication with an FP-1600.
    If someone could post an example of a VB application that can do this, or explain how I should go about it, I would be very grateful.

    Ben,
    The FieldPoint OPC Server will publish only the first element of a multi-channel analog signal. What you should do is use multiple DataSocket connections (URL's), one to each channel to get all the data that you desire. There is no drawback to doing this method (other than needing to code additional connections using the same CWDS object). The information will not be any better or worse synchronized and all the data is independantly time-stamped.
    I would not recommend that you try to bypass the OPC Server. The FieldPoint Ethernet modules use a NI ethernet protocol that is proprietary so there is no information or examples on doing direct communcation using winsock.

  • Error sending emails to Internet: Failed to connect. Winsock error code: 10051

    Our exchange 2013 CU2 (CAS+MBX, Win2012) was sending emails to Internet using another server (a kerio email server) and outbound internet email was working as expected.
    We have now removed the Kerio server, I also removed the kerio_Send_Connector I was using to send emails to internet and I also changed the email domain in Exchange to be authoritative. I created a new Internet send connector with default values, but the same
    bad behavior is present.
    Our Exchange 2013 receives emails internally and externally with no problems. The problems are sending emails to Internet. I am suspecting something in the firewall but i need to do some more research.
    If from the same Exchange server I telnet to an Internet email host:25 I do get the smtp banner but as soon as I start typing HELO/EHLO I get disconnected and errors are logged.
    Errors when sending emails to any emails address (this is from an email sent to google, all others are the same):
    Remote Server at aspmx3.googlemail.com (74.125.136.26) returned '400 4.4.7 Message delayed'
    7/1/14 9:52:44 a. m. - Remote Server at aspmx3.googlemail.com (74.125.136.26) returned '441 4.4.1 Error encountered while communicating with primary target IP address: "Failed to connect. Winsock error code: 10051, Win32 error code: 10051." Attempted
    failover to alternate host, but that did not succeed. Either there are no alternate hosts, or delivery failed to all alternate hosts. The last endpoint attempted was 74.125.136.26:25'
    I cannot find any references from such Winsock error that are related to Exchange 2013.
    So far all email is being queued at the Exchange Server 2013. I am afraid to install CU3 and make things worse.
    Thanks for your comments.

    Just check if the receive connector settings are set to fine
    check the send connector properties and see whether it is  set to use DNS to route emails through external DNS/Internal DNS or smart host .
    Do a telnet to external domain like hotmail,yahoo and see  at what transaction you are getting an error
    Enable verbose logging, restart the transport service and check if you get the same error in the verbose logs as well
    Get in touch with the ISP and see if the port 25 for Outbound SMTP is  opened.
    YOu can check if SMTP Proxy is enabled in the firewall. If so disable the SMTP proxy in the firewall and check.
    Good Luck!!
    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question.
    That will encourage me - and others - to take time out to help you.
    Regards,
    Sathish

  • ITunes crashing when syncing with my iphone 3gs on a Vista machine post upgrade..have tried the netsch winsock reset but no luck...any ideas?

    Upgraded my iTunes to the latest version and upgraded my iPhone 3gs to IOS5. Unable to sync my iPhone with iTunes after upgrade and is getting stuck on Step1. I am running my iTunes on Windows Vista PC and have tried the solution of netsh winsock reset and still no luck.
    Also, I am not able to see any of my music on the phone post upgrade, but it shows on iTunes. Again not sure on how to make it appear on my phone. Any help would be much appreciated!!
    Cheers,
    Kishore

    my advice to you is to SWITCH TO SOMETHING BESIDES "VISTA"!!!!!!!!!!!!!

  • NAC CCA 4.1.3.1 gives winsock error

    Hi Friends,
    I have nac solution implemented in my network. Clients are able to get authenticated through NAC web agent. But with clean access agent its not working.
    clean access agent doesn't popup for the username and password, when i click on login it gives the error message as "WinSock Error: invalid state of operation"
    any help is appreciated.
    Thanks
    Ravi

    From NAC 4.x, VPN SSO is supported for the following devices :
    http://www.cisco.com/en/US/docs/security/nac/appliance/release_notes/40/4rn.html#wp38043

  • Example VIs for winsock with LabVIEW 7.0

    Are there any example VIs for TCP communications with winsock using LabVIEW 7.0?

    I would like to join the request - I would like to know how to use WinSock from within LabVIEW to use a modem to dial a number and connect to another PC with a modem. An extra complicaiton is the fact that I need to be able to vary the number (to access numerous data acquisition stations).
    Message Edited by alysko on 03-08-2006 03:57 PM
    Message Edited by alysko on 03-08-2006 03:58 PM

  • CSS Load Balancing for MS Winsock Proxy Client

    Has anyone load balanced Microsoft Winsock Proxy client? I am trying to load balance internal users using the Winsock client to two MS ISA Servers running Winsock proxy for application access to the internet.

    Thanks for the post, I got this from Microsoft:
    I wanted to update you on the information I investigated on the firewall client. I found the the actual port connection used to control the connection thru ISA is by default UDP. This UDP session is over 1745 to the ISA server. This intial connection then allows for a connection over an ephemeral port to the ISA server for the actual data transfer. The data transfer is done via a TCP connection. The connection control is UDP based by default. This can be changed in the Wspcfg.ini file. By adding the ControlChannel value to the WSP_client_app section of this file, you can use WSP.TCP to allow the connections to be based with TCP. In your situation, this may be the best scenario due to the connections being load balanced.
    TCP is used by default when checking the Firewall configuration. This is why the traces showed the connection with TCP.
    Information on this can be found in the ISA help files. In the search panel of the ISA help, type in "ControlChannel" without the quotes and it will show information on this feature.
    I will re-test with TCP only setup, and see if this helps. I also have some sniffer traces I need to review to see if maybe NAT is killing me, not UDP traffic.
    I'll post back my findings next week.

  • TS4123 So what if the only Winsock Provider listed is the Bonjour Namespace Provider?

    AppleMobileDeviceService.exe is constantly hogging one CPU on my machine. I've tried the Winsock command line reset (netsh winsock reset) and that seemed to work for awhile. Then the problem reappears.
    I've tried stopping/starting or restarting the processes via the MS Services interface, and again, this resolves the issue temporarily. I've also, mostly out of frustration, stopped the process manually. Always comes back.
    I've taken a look at Apple's suggestion (TS4123) which implies that their is some sort of conflict with another program. Back to my initial question:
    So what if the only Winsock Provider listed is the Bonjour Namespace Provider?
    Overall, at this point, I have to agree with the vast majority of users who are capable of both recognizing that this is a problem and troubleshooting it to this point: This is an Apple problem and it needs to be fixed by Apple, not passed off as a conflict from some other program that is "doing something wrong" in the eyes of Apple.
    My next step is to continue troubleshooting on my own to come up with a workaround solution that doesn't require me resetting winsock or killing multiple processes every day in order to use a processor that shouldn't be taken hostage to begin with.
    Has anyone out there explored the onset of this problem (I've seen iTunes 10.5) in relation to updating devices via WiFi network (also iTunes 10.5 feature add?).
    I'm going to start by there and disable updating of all devices over WiFi to see if that  prevents the CPU hogging. Hopefully that's not it, because that sure is a great feature.
    As a Mac user since 1985 and a M$ programmer for more than a decade, this is an extremely disappointing problem and one that should be an easy fix considering the resources AAPL manages to accrue.

    Nevermind.
    Further review indicates that two up to date (iOS 6.1.4, Build 10B350) as of 7pm CST 7/2/2013 still causing AppleMobileDeviceService.exe to peg one processor at 100%.
    Going to turn off "Sync with this iPhone over WIFI" for both phones and see if that does it.
    Shameful really.
    Edit: iTunes up to date with 11.0.4.4
    Message was edited by: shaggy19

  • TS4123 I have problem with iTunes story (secure link to itunes store failed). I make In the "Command Prompt" screen, type in   netsh winsock reset the itune story is solve but after i close itunes the problem is back

    I have problem with iTunes story (secure link to itunes store failed). I make In the "Command Prompt" screen, type in   netsh winsock reset the itune story is solve but after i close itunes the problem is back

    The results show that you have a proxy server set and this can often cause problems with iTunes.
    The proxy setting can be accessed in Internet options>>Connections>>LAN Settings.
    Try un-checking the proxy server check box.
    It might also be a good idea to run a malware check if you didn't know you had the proxy server set.
    You can download a free version of an excellent scanner- Malwarebytes here:
    http://www.malwarebytes.org/

  • ITunes is hogging 100% of CPU. Tried "netsh winsock reset" fix already

    I recently upgraded to 10.5 and iOS5. I had a similar problem to many in the community related to the sync getting stuck in the "back up" portion, so I tried the solution proposed by a bunch of people re: "netsh winsock reset" and I can now sync, but I still have the issue of iTunes and APSDaemon hogging nearly 100% of CPU. Anyone else having the same problem? Any insight would be appreciated. Thanks

    I'm having similar problems after the 10.5 upgrade on Vista. Tried the repair option in Control Panel, then uninstalled and did a fresh installation thinking it might have been due to the Apple upgrade installer but I'm still having the same problems. I've got 3gb of RAM but I can't even do something like writing an email at the same time as using iTunes without it beeping at me.

  • Winsock Error on Send

    Hi All,
    I am getting "winsock error on send " while trying to mount the server in console.
    Kindly suggest the cause.
    BR
    SK

    Hello SK
    If you use Windows server for SAP MDM Server installation you can install MDM Console to the same place.
    Install it and check your connection to MDS.
    If from server  MDM Console work fine and from another PC doesn't work (you get error message).
    Check your phisical connection to server(where MDS has installed) from your local PC.
    Check your locval and server firewall or antivirus software configuration - may be it's blocked some ports like:
    MDS
    Port 59950 and three sequential ports
    from the range 2000 - 9999 for every
    loaded repository (the repository ports
    are configurable using the MDM
    Console).
    MDIS
    Port 59750
    MDSS
    Port 59850
    MDLS
    Port 59650
    I think that is help you
    Regards
    Kanstantsin Chernichenka

  • ITunes Store Can't Connect - It's NOT Winsock!

    So I've been through hundreds of posts about this issue and have tried what I believe is everything. I'm having the issue of being unable to connect to the iTunes Store while running Windows 7 on an Asus G53. When I run diagnostics, I am told that the Windows Firewall is blocking iTunes. Additionaly, when I go to the Home Sharing tab, I'm told that Bonjour is not running. However, I clearly have iTunes and Bonjour listed as allowed programs in Windows Firewall, and have used the "Advanced Settings" to manually re-add them several times. Additionally, I have tried:
    resetting winsock protocol (numerous times)
    used the autoruns application to discover that the only winsock provider I have running is Bonjour
    opening ports 80 and 443 (http://support.apple.com/kb/TS1629)
    completely disabling Windows Firewall, including the service
    reinstalling iTunes 10.7 instead of 11
    flushing my DNS
    running iTunes as an administrator
    resetting Bonjour (I can verify that the processes are running)
    I am totally out of ideas! Can anyone help?? Please!!

    Checking on something really exotic.
    Is your iTunes Help also behaving oddly?
    If so, try checking on the possibility described by tonyski in the following post:
    Re: iTunes freezes when I select help

  • How do VB Winsock component communicate with J2EE server  by ServerSocket ?

    We are designing a thin client and server software system.
    The server is application server with java language, the client is application with VB language.
    The vb client program using Winsock component connect to the java application server of ServerSocket by specifying port.
    This system had been tested run for end user.
    Now, we would like the application server turn on j2ee platform. we don't know how the JavaTM 2 Platform, Enterprise Edition SDK version 1.3 can communicate with the vb client program?
    Who would like to tell us.

    Your problem is not uncommon. You do have an advantage: your server code is already in Java. You have some options here. However, I am guessing that either (a) you're running out of time to implement a solution or (b) you're running out of budget. In either case, the easiest solution will be to build a simple multiple socket server client to run on the server. You can create multiple threads to talk to multiple clients via server sockets. You could allocate a port range to use. The clients could then use a randomize algorithm to select a port in the range. If already in use, then go to the next one.
    There is a crude sample in the Sun Java Trails that can get you started.
    HTH

  • Listener trace file: Winsock 54 errors

    I am seeing many of the following error ("soc nnn error - operation=5, ntresnt[0]=517, ntresnt[1]=54...") in my Listener trace file.
    This is on an Oracle 9.2.0.4 server (Windows 2003 Server R2).
    If my intepretation of the Listener trace is correct, this corresponds to Winsock Error 10054 (Connection reset by peer).
    SQL*net trace files at the client side (a separate host) do not indicate a corresponding error - all the trace files appear "clean".
    So what is the peer in this context? My initial thought was that the Oracle server had established a session for the client, but then the client
    had appeared to disappear from the network. But I would have expected to see something in the client trace files at the same time.
    This is an example from the Listener trace file.
    nscon: sending NSPTRD packet
    nspsend: entry
    nspsend: plen=65, type=5
    nttmwr: entry
    nttmwr: socket 332 had bytes written=65
    nttmwr: exit
    nspsend: 65 bytes to transport
    nspsend: packet dump
    nspsend: 00 41 00 00 05 00 00 00 |.A......|
    nspsend: 00 37 28 41 44 44 52 45 |.7(ADDRE|
    nspsend: 53 53 3D 28 50 52 4F 54 |SS=(PROT|
    nspsend: 4F 43 4F 4C 3D 74 63 70 |OCOL=tcp|
    nspsend: 29 28 48 4F 53 54 3D 31 |)(HOST=1|
    nspsend: 39 32 2E 31 36 38 2E 32 |92.168.2|
    nspsend: 2E 32 35 34 29 28 50 4F |.254)(PO|
    nspsend: 52 54 3D 34 34 35 37 29 |RT=4457)|
    nspsend: 29 |) |
    nspsend: normal exit
    nscon: exit (0)
    nsdo: nsctxrnk=0
    nsdo: normal exit
    nsrah: entry
    nsrah: reading (asynchronously) from transport...
    nsrah: ...into overflow area...
    nttmrd: entry
    ntt2err: entry
    ntt2err: soc 332 error - operation=5, ntresnt[0]=517, ntresnt[1]=54, ntresnt[2]=0
    ntt2err: exit
    ntt2err: entry
    ntt2err: Read unexpected EOF ERROR on 332
    ntt2err: exit
    nttmrd: socket 332 had bytes read=0
    nttmrd: exit
    nserror: entry
    nserror: nsres: id=4, op=68, ns=12537, ns2=12560; nt[0]=507, nt[1]=0, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0
    nsrah: exit (-1)
    nsclose: entry
    nstimarmed: entry
    nstimarmed: no timer allocated
    nstimarmed: normal exit
    Any thoughts/recommendations on this would be gratefully received, thanks.
    Andy.

    nspsend: 4F 43 4F 4C 3D 74 63 70 |OCOL=tcp|
    nspsend: 29 28 48 4F 53 54 3D 31 |)(HOST=1|
    nspsend: 39 32 2E 31 36 38 2E 32 |92.168.2|
    nspsend: 2E 32 35 34 29 28 50 4F |.254)(PO|
    nspsend: 52 54 3D 34 34 35 37 29 |RT=4457)|
    So what is the peer in this context?192.168.2.245 port=4457
    go to http://download.oracle.com/docs/cd/B10501_01/network.920/a96580/troubles.htm
    then Find: EOF ERROR

  • Winsock error when doing MDM sync

    Hello
    I am running MDM Server 5.5 sp3 and I frequently (not all the time) get a popup while synchronizing an existing slave that says "Winsock error on connect".
    It seems like this interrupts the sync, so I re-run the sync and it usually finishes ok.
    Any help would be appreciated.
    Thanks
    Dave

    Shiv
    Thanks for the reply.
    Your answer makes sense except this happens a few minutes after the sync has started, I am already connected. If I just run the sync again it will finish ok.
    I guess it could be that I am getting intermittent disconnects to database? Is this possible? Database connection is on a dedicated gigabit network.
    Any ideas?
    Thanks
    Dave

Maybe you are looking for