source: trunk/src/testing/app/svc/include/SVC_output_net.h @ 4

Revision 4, 2.7 KB checked in by ajaworski, 13 years ago (diff)

Added modified SAGE sources

Line 
1
2/******************************************************************************
3 * SAGE - Scalable Adaptive Graphics Environment
4 *
5 * Copyright (C) 2004 Electronic Visualization Laboratory,
6 * University of Illinois at Chicago
7 *
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions are met:
12 *
13 *  * Redistributions of source code must retain the above copyright
14 *    notice, this list of conditions and the following disclaimer.
15 *  * Redistributions in binary form must reproduce the above
16 *    copyright notice, this list of conditions and the following disclaimer
17 *    in the documentation and/or other materials provided with the distribution.
18 *  * Neither the name of the University of Illinois at Chicago nor
19 *    the names of its contributors may be used to endorse or promote
20 *    products derived from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
26 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
28 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 *
34 * Direct questions, comments etc about SAGE to http://www.evl.uic.edu/cavern/forum/
35 *
36 *****************************************************************************/
37
38#ifndef SVC_OUTPUT_NET_H
39#define SVC_OUTPUT_NET_H
40
41#include "SVC_output_module.h"
42#include <sys/socket.h>
43#include <sys/types.h>
44#include <netinet/in.h>
45#include <unistd.h>
46#include <arpa/inet.h>
47
48class SVC_output_net: public SVC_output_module
49{
50public:
51    SVC_output_net();
52    void init2();
53    void push_data(unsigned char* buf , int width, int height, int b_pixel);
54    unsigned char* init(int width, int height, int b_pixel,char* output_addr, int output_port);
55
56private:
57    int m_width;
58    int m_height;
59    int m_byte_pixel;
60    int m_color_mode;
61    int m_flag_done;
62    unsigned char* m_inter_buffer,*m_inter_buffer_ptr;
63    int m_flag_notinit;
64    char* m_output_addr;
65    int m_output_port;
66    int m_count;
67
68    int fd;
69    struct sockaddr_in cli_addr,serv_addr;
70    int result;
71    socklen_t cli_len,serv_len;
72
73};
74#endif
Note: See TracBrowser for help on using the repository browser.