Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

Dee Veloper

@Dee Veloper
About
Posts
6
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • UMDF USB driver: application stream into USB frames
    D Dee Veloper

    Hi! Currently I am writing data from my application via WriteFile to my UMDF USB driver and send the stuff over bulk endpoints. I'd like to send only single USB frames from my application to my device. Is there a way to break the data stream from the application into USB frames without applying an own transfer protocol (e.g. packet length, packet data...)? Since USB has such a protocol (framing) I think it is rather annoying to implement a new framing protocol on top of it just to make sure that my app. receives and sends only single USB frames. Any ideas? Thanks!

    Hardware & Devices question

  • Tcp/Ip send() does sometimes not succeed
    D Dee Veloper

    I guess I have to think through my code step by step once again. At least I know now, that send() should send after 200ms as long as the connection is established. Thanks again for your help! Flo

    C / C++ / MFC c++ sysadmin question csharp help

  • Tcp/Ip send() does sometimes not succeed
    D Dee Veloper

    maxRead is the maximum number of bytes the buffer can store. if recvMsgSize is smaller than maxRead (which is normally the case) I copy the data to additional buffers and combine them as soon as all bytes are received. With my problem the data received is always smaller than maxRead.

    C / C++ / MFC c++ sysadmin question csharp help

  • Tcp/Ip send() does sometimes not succeed
    D Dee Veloper

    Thanks for your help so far Mark. I hope this code snippet gives you an idea for a solution: TIMEVAL tv; tv.tv_sec=0; tv.tv_usec=5; FD_ZERO(&clientSet); FD_SET(theClient->sock,&clientSet); if ((errCode=select(0,&clientSet,NULL,NULL,&tv))>0) { if ((recvMsgSize=recv(theClient->sock,addBuffer,maxRead,0))<=0) { //error handling ... } else message handling... I do not receive an error or a message. Select() returns only timeout. Flo

    C / C++ / MFC c++ sysadmin question csharp help

  • Tcp/Ip send() does sometimes not succeed
    D Dee Veloper

    I checked the number of bytes received and sent. The problem is that the send command really does not send anything (I observed my network traffic) but tells me it has sent the correct amount of bytes. I doublechecked with breakpoints and everything I can think of and I have no idea why it does not send anything. The other side is listening with select and no data is to be received. This happens only sometimes. Normally it works fine. Frustrating :( Flo

    C / C++ / MFC c++ sysadmin question csharp help

  • Tcp/Ip send() does sometimes not succeed
    D Dee Veloper

    Hi! I am currently programming server/client stuff with the c++ functions send and recv. Normally everything works fine but sometimes the client tells me it has sent a message successfully but it is not received by the server. I tracked the packets in the network and no packet had been sent. Documentation says not every successful call to send() guarantees that the data is received by the client. Unfortunately the packet is never sent (waited up to 3 minutes). Since Tcp/Ip is a reliable protocol, I expected the packets to be received by the client as long as the connection is not terminated. How can I make sure that send really sends my data? Is there a flush() command? (using Tcp/Ip non blocking windows socket, checking for send/receive with select). Any help would be greatly appreciated!!! Thx Flo P.S. Before you ask: it has to be c++ send and recv - no MFC or C# stuff...

    C / C++ / MFC c++ sysadmin question csharp help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups