History

pong

Sigrid Solveig Haflínudóttir committed 5 years ago

Commit 12219b11 parent a0e0f7a1 file · +13 −2Browse files

Unified · Split

rtmp.c+13−2
@@ -20,6 +20,7 @@ enum { · 19 unmodified lines
20 Type2,20 Type2,
21 Type3,21 Type3,
22 22
23 CSUserCtl = 2,
23 CSCtl = 3,24 CSCtl = 3,
24 25
25 CbCommand = 0,26 CbCommand = 0,
@@ -372,6 +373,16 @@ rtmpfree(RTMP *r) · 346 unmodified lines
372 free(r);373 free(r);
373}374}
374 375
376static int
377pong(RTMP *r, s32int n)
378{
379 newmsg(r, UserControl, Type0, CSUserCtl);
380 puti16(CtlPingResponse);
381 puti32(n);
382
383 return rtmpsend(r);
384}
385
375static void386static void
376loop(void *aux)387loop(void *aux)
377{388{
@@ -472,8 +483,8 @@ loop(void *aux) · 94 unmodified lines
472 case CtlStreamIsRecorded:483 case CtlStreamIsRecorded:
473 if(0){484 if(0){
474 case CtlPingRequest:485 case CtlPingRequest:
475 /* FIXME pong */486 if(pong(r, n) != 0)
476 USED(n);487 goto err;
477 }488 }
478 if(debug)489 if(debug)
479 fprint(2, ": %s %d", ctl2s[s16], n);490 fprint(2, ": %s %d", ctl2s[s16], n);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t