Rev 305 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 305 | Rev 306 | ||
|---|---|---|---|
| Line 170... | Line 170... | ||
| 170 | if ((dataSize = ServerTCPRead (g_hconversation, receiveBuf, dataSize, 1000)) < 0) { |
170 | if ((dataSize = ServerTCPRead (g_hconversation, receiveBuf, dataSize, 1000)) < 0) { |
| 171 | printf("Receive Error\n"); |
171 | printf("Receive Error\n"); |
| 172 | } else { |
172 | } else { |
| 173 | receiveBuf[dataSize] = '\0'; |
173 | receiveBuf[dataSize] = '\0'; |
| 174 | printf("Received %s\n", receiveBuf); |
174 | printf("Received %s\n", receiveBuf); |
| - | 175 | int cmd=0; |
|
| - | 176 | float arg; |
|
| - | 177 | sscanf("%d%f",&cmd,&arg); |
|
| - | 178 | switch (cmd){ |
|
| - | 179 | case 1: |
|
| - | 180 | SetCtrlVal(ps.PA_TSET,arg); |
|
| - | 181 | break; |
|
| - | 182 | default: |
|
| - | 183 | break; |
|
| - | 184 | ||
| - | 185 | } |
|
| 175 | } |
186 | } |
| 176 | break; |
187 | break; |
| 177 | case TCP_DISCONNECT: |
188 | case TCP_DISCONNECT: |
| 178 | if (handle == g_hconversation) { |
189 | if (handle == g_hconversation) { |
| 179 | /* The client we were talking to has disconnected... */ |
190 | /* The client we were talking to has disconnected... */ |