EMMA Coverage Report (generated Tue Dec 18 20:38:46 CET 2007)
[all classes][cz.vutbr.feec.session.rtprtcp.internal]

## COVERAGE SUMMARY FOR SOURCE FILE [RtcpSenderSocket.java]

name | class, % | method, % | block, % | line, %
--- | --- | --- | --- | ---
RtcpSenderSocket.java | 0% (0/1) | 0% (0/3) | 0% (0/47) | 0% (0/15)

### COVERAGE BREAKDOWN BY CLASS AND METHOD

name | class, % | method, % | block, % | line, %
--- | --- | --- | --- | ---
class RtcpSenderSocket | 0% (0/1) | 0% (0/3) | 0% (0/47) | 0% (0/15)
RtcpSenderSocket (boolean): void |  | 0% (0/1) | 0% (0/19) | 0% (0/6)
close (): void |  | 0% (0/1) | 0% (0/11) | 0% (0/4)
send (DatagramPacket, byte): void |  | 0% (0/1) | 0% (0/17) | 0% (0/5)

1 | package cz.vutbr.feec.session.rtprtcp.internal;
2 |
3 | import java.io.IOException;
4 | import java.net.DatagramPacket;
5 | import java.net.DatagramSocket;
6 | import java.net.MulticastSocket;
7 |
8 | /**
9 | * The Class RtcpSenderSocket.
10 | */
11 | public class RtcpSenderSocket {
12 |
13 | /** The m_socket. */
14 | private MulticastSocket m_socket;
15 |
16 | /** The u_socket. */
17 | private DatagramSocket u_socket;
18 |
19 | /** The is multicast. */
20 | private boolean isMulticast;
21 |
22 | /**
23 | * The Constructor.
24 | *
25 | * @param isMulticast the is multicast
26 | *
27 | * @throws IOException the IO exception
28 | */
29 | public RtcpSenderSocket(final boolean isMulticast) throws IOException {
30 | this.isMulticast = isMulticast;
31 | if(isMulticast){
32 | // System.out.println("WWWWWWWWWWWWWWW RTCP #S# #M# : NO PORT");
33 | m_socket = new MulticastSocket();
34 | } else {
35 | // System.out.println("WWWWWWWWWWWWWWW RTCP #S# #U# : NO PORT");
36 | u_socket = new DatagramSocket();
37 | }
38 | }
39 |
40 | /**
41 | * Send.
42 | *
43 | * @param ttl the ttl
44 | * @param pkt the pkt
45 | *
46 | * @throws IOException the IO exception
47 | */
48 | public void send(DatagramPacket pkt, byte ttl) throws IOException {
49 | // if(isMulticast){
50 | // System.out.println("RTCP SENT (S)");
51 | // } else {
52 | // System.out.println("RTCP SENT (R)");
53 | // }
54 |
55 | if(this.isMulticast){
56 | m_socket.setTimeToLive(ttl);
57 | m_socket.send(pkt);
58 | } else {
59 | // System.out.println("QQQQQQQQQQQQQQQQ :"+pkt.getAddress()+"/"+pkt.getPort());
60 | u_socket.send(pkt);
61 | }
62 | }
63 |
64 | /**
65 | * Close.
66 | */
67 | public void close(){
68 | if(isMulticast){
69 | m_socket.close();
70 | } else {
71 | u_socket.close();
72 | }
73 | }
74 | }

[all classes][cz.vutbr.feec.session.rtprtcp.internal]
EMMA 2.0.5312 EclEmma Fix 1 (C) Vladimir Roubtsov