C# 화면캡쳐(이미지 전송), 채팅, 소켓, 스레드, 다중서버 프로그램
*용*
다운로드
장바구니
소개글
졸업작품, 졸업프로젝트 제출용 프로그램 입니다.개발 언어 : C#
개발 프로그램
1. Super_Client (방송자)
2. Server (다중 접속 분배 서버)
3. Multi_Client (시청자)
방송자의 화면이 0.2 초 간격으로 캡쳐된다.
캡쳐된 이미지는 서버로 보내지며
서버는 연결된 시청자들 모두에게 실시간으로 캡쳐 영상을 보여준다.
(일명 실시간 방송 프로그램)
예) 다음팟 플레이어로 자신의 컴퓨터 화면을 방송하죠? 그거라고 생각하시면 됩니다.
사운드는 지원하지 않습니다.
더욱 자세한 설명은 아래 동영상을 보세요~
제가 직접 촬영해서 올린 동영상 입니다.
설명 읽는거보다 한번 보시는게 빠를거에요~
http://www.youtube.com/watch?v=uY5O8aM5UsI
컴파일 실행환경
Visual Studio 2008, C#본문내용
using System;using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Imaging;
using System.Diagnostics;
using System.Threading;
using System.IO;
using System.IO.Compression;
using System.Management;
using System.Net;
using System.Net.Sockets;
using System.Runtime.Serialization.Formatters.Binary;
namespace WindowsFormsApplication1
{
class AcceptSocket1
{
private IPAddress ip; // IP 주소
private int port; // Port 번호
private IPEndPoint endPoint; // 연결 매체
private Socket socket;
private Server f_Info;
public List clientList1;
public Thread th;
// 이미지 전용 소켓 연결
public AcceptSocket1(Server form_Info)
{
// 폼 컨트롤러 사용을 위한 폼 정보 초기화
this.f_Info = form_Info;
// 클라이언트 정보를 담을 리스트 생성
clientList1 = new List();
//1.종단점 생성(서버쪽..자신)
ip = IPAddress.Any;
port = 22;
endPoint = new IPEndPoint(ip, port);
//2. Tcp Socket 생성
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
//3. 바인드
socket.Bind(endPoint);
//4. 연결 대기
socket.Listen(100);
f_Info.lbl.Text = "연결대기";
//5. 연결 수락, 클라이언트 소켓 생성
th = new Thread(new ThreadStart(run));
th.Start();
}
압축파일 내 파일목록
Multi_Client/Multi_Client/bin/Debug/Multi_Client.exe
Multi_Client/Multi_Client/bin/Debug/Multi_Client.pdb
Multi_Client/Multi_Client/bin/Debug/Multi_Client.vshost.exe
Multi_Client/Multi_Client/bin/Debug/Multi_Client.vshost.exe.manifest
Multi_Client/Multi_Client/bin/Debug/StringTokenizer.dll
Multi_Client/Multi_Client/bin/Debug/WindowsFormsApplication1.vshost.exe
Multi_Client/Multi_Client/bin/Debug/WindowsFormsApplication1.vshost.exe.manifest
Multi_Client/Multi_Client/bin/Debug/x2.jpg
Multi_Client/Multi_Client/bin/Release/Multi_Client.exe
Multi_Client/Multi_Client/bin/Release/Multi_Client.pdb
Multi_Client/Multi_Client/bin/Release/StringTokenizer.dll
Multi_Client/Multi_Client/bin/Release/x2.jpg
Multi_Client/Multi_Client/Multi_Client.cs
Multi_Client/Multi_Client/Multi_Client.csproj
Multi_Client/Multi_Client/Multi_Client.csproj.user
Multi_Client/Multi_Client/Multi_Client.Designer.cs
Multi_Client/Multi_Client/Multi_Client.resx
Multi_Client/Multi_Client/obj/Debug/Multi_Client.csproj.FileListAbsolute.txt
Multi_Client/Multi_Client/obj/Debug/Multi_Client.csproj.GenerateResource.Cache
Multi_Client/Multi_Client/obj/Debug/Multi_Client.exe
Multi_Client/Multi_Client/obj/Debug/Multi_Client.pdb
Multi_Client/Multi_Client/obj/Debug/Refactor/
Multi_Client/Multi_Client/obj/Debug/ResolveAssemblyReference.cache
Multi_Client/Multi_Client/obj/Debug/TempPE/
Multi_Client/Multi_Client/obj/Debug/WindowsFormsApplication1.Multi_Client.resources
Multi_Client/Multi_Client/obj/Debug/WindowsFormsApplication1.Properties.Resources.resources
Multi_Client/Multi_Client/obj/Release/Multi_Client.csproj.FileListAbsolute.txt
Multi_Client/Multi_Client/obj/Release/Multi_Client.csproj.GenerateResource.Cache
Multi_Client/Multi_Client/obj/Release/Multi_Client.exe
Multi_Client/Multi_Client/obj/Release/Multi_Client.pdb
Multi_Client/Multi_Client/obj/Release/TempPE/
Multi_Client/Multi_Client/obj/Release/WindowsFormsApplication1.Multi_Client.resources
Multi_Client/Multi_Client/obj/Release/WindowsFormsApplication1.Properties.Resources.resources
Multi_Client/Multi_Client/Program.cs
Multi_Client/Multi_Client/Properties/AssemblyInfo.cs
Multi_Client/Multi_Client/Properties/Resources.Designer.cs
Multi_Client/Multi_Client/Properties/Resources.resx
Multi_Client/Multi_Client/Properties/Settings.Designer.cs
Multi_Client/Multi_Client/Properties/Settings.settings
Multi_Client/Multi_Client.sln
Multi_Client/Multi_Client.suo
Server/Server/AcceptSocket1.cs
Server/Server/AcceptSocket2.cs
Server/Server/bin/Debug/Server.exe
Server/Server/bin/Debug/Server.pdb
Server/Server/bin/Debug/Server.vshost.exe
Server/Server/bin/Debug/Server.vshost.exe.manifest
Server/Server/bin/Debug/StringTokenizer.dll
Server/Server/bin/Debug/WindowsFormsApplication1.vshost.exe
Server/Server/bin/Debug/WindowsFormsApplication1.vshost.exe.manifest
Server/Server/bin/Debug/x.jpg
Server/Server/bin/Debug/x0.jpg
Server/Server/bin/Release/Server.exe
Server/Server/bin/Release/Server.pdb
Server/Server/bin/Release/StringTokenizer.dll
Server/Server/bin/Release/x.jpg
Server/Server/bin/Release/x0.jpg
Server/Server/ClientHandler1.cs
Server/Server/ClientHandler2.cs
Server/Server/obj/Debug/Refactor/
Server/Server/obj/Debug/ResolveAssemblyReference.cache
Server/Server/obj/Debug/Server.csproj.FileListAbsolute.txt
Server/Server/obj/Debug/Server.csproj.GenerateResource.Cache
Server/Server/obj/Debug/Server.exe
Server/Server/obj/Debug/Server.pdb
Server/Server/obj/Debug/TempPE/
Server/Server/obj/Debug/WindowsFormsApplication1.Properties.Resources.resources
Server/Server/obj/Debug/WindowsFormsApplication1.Server.resources
Server/Server/obj/Release/Server.csproj.FileListAbsolute.txt
Server/Server/obj/Release/Server.csproj.GenerateResource.Cache
Server/Server/obj/Release/Server.exe
Server/Server/obj/Release/Server.pdb
Server/Server/obj/Release/TempPE/
Server/Server/obj/Release/WindowsFormsApplication1.Properties.Resources.resources
Server/Server/obj/Release/WindowsFormsApplication1.Server.resources
Server/Server/Program.cs
Server/Server/Properties/AssemblyInfo.cs
Server/Server/Properties/Resources.Designer.cs
Server/Server/Properties/Resources.resx
Server/Server/Properties/Settings.Designer.cs
Server/Server/Properties/Settings.settings
Server/Server/Server.cs
Server/Server/Server.csproj
Server/Server/Server.csproj.user
Server/Server/Server.Designer.cs
Server/Server/Server.resx
Server/Server/User.cs
Server/Server.sln
Server/Server.suo
Super_Client/Super_Client/bin/Debug/StringTokenizer.dll
Super_Client/Super_Client/bin/Debug/Super_Client.exe
Super_Client/Super_Client/bin/Debug/Super_Client.pdb
Super_Client/Super_Client/bin/Debug/Super_Client.vshost.exe
Super_Client/Super_Client/bin/Debug/Super_Client.vshost.exe.manifest
Super_Client/Super_Client/bin/Debug/test.jpg
Super_Client/Super_Client/bin/Debug/WindowsFormsApplication1.exe
Super_Client/Super_Client/bin/Debug/WindowsFormsApplication1.pdb
Super_Client/Super_Client/bin/Debug/WindowsFormsApplication1.vshost.exe
Super_Client/Super_Client/bin/Debug/x.jpg
Super_Client/Super_Client/bin/Debug/x1.jpg
Super_Client/Super_Client/bin/Release/StringTokenizer.dll
Super_Client/Super_Client/bin/Release/Super_Client.exe
Super_Client/Super_Client/bin/Release/Super_Client.pdb
Super_Client/Super_Client/bin/Release/x.jpg
Super_Client/Super_Client/bin/Release/x1.jpg
Super_Client/Super_Client/obj/Debug/Refactor/
Super_Client/Super_Client/obj/Debug/ResolveAssemblyReference.cache
Super_Client/Super_Client/obj/Debug/Super_Client.csproj.FileListAbsolute.txt
Super_Client/Super_Client/obj/Debug/Super_Client.csproj.GenerateResource.Cache
Super_Client/Super_Client/obj/Debug/Super_Client.exe
Super_Client/Super_Client/obj/Debug/Super_Client.pdb
Super_Client/Super_Client/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll
Super_Client/Super_Client/obj/Debug/WindowsFormsApplication1.csproj.FileListAbsolute.txt
Super_Client/Super_Client/obj/Debug/WindowsFormsApplication1.csproj.GenerateResource.Cache
Super_Client/Super_Client/obj/Debug/WindowsFormsApplication1.exe
Super_Client/Super_Client/obj/Debug/WindowsFormsApplication1.pdb
Super_Client/Super_Client/obj/Debug/WindowsFormsApplication1.Properties.Resources.resources
Super_Client/Super_Client/obj/Debug/WindowsFormsApplication1.Super_Client.resources
Super_Client/Super_Client/obj/Release/Super_Client.csproj.FileListAbsolute.txt
Super_Client/Super_Client/obj/Release/Super_Client.csproj.GenerateResource.Cache
Super_Client/Super_Client/obj/Release/Super_Client.exe
Super_Client/Super_Client/obj/Release/Super_Client.pdb
Super_Client/Super_Client/obj/Release/TempPE/Properties.Resources.Designer.cs.dll
Super_Client/Super_Client/obj/Release/WindowsFormsApplication1.Properties.Resources.resources
Super_Client/Super_Client/obj/Release/WindowsFormsApplication1.Super_Client.resources
Super_Client/Super_Client/Program.cs
Super_Client/Super_Client/Properties/AssemblyInfo.cs
Super_Client/Super_Client/Properties/Resources.Designer.cs
Super_Client/Super_Client/Properties/Resources.resx
Super_Client/Super_Client/Properties/Settings.Designer.cs
Super_Client/Super_Client/Properties/Settings.settings
Super_Client/Super_Client/Super_Client.cs
Super_Client/Super_Client/Super_Client.csproj
Super_Client/Super_Client/Super_Client.csproj.user
Super_Client/Super_Client/Super_Client.Designer.cs
Super_Client/Super_Client/Super_Client.resx
Super_Client/Super_Client.sln
Super_Client/Super_Client.suo
Multi_Client/Multi_Client/bin/Debug/Multi_Client.pdb
Multi_Client/Multi_Client/bin/Debug/Multi_Client.vshost.exe
Multi_Client/Multi_Client/bin/Debug/Multi_Client.vshost.exe.manifest
Multi_Client/Multi_Client/bin/Debug/StringTokenizer.dll
Multi_Client/Multi_Client/bin/Debug/WindowsFormsApplication1.vshost.exe
Multi_Client/Multi_Client/bin/Debug/WindowsFormsApplication1.vshost.exe.manifest
Multi_Client/Multi_Client/bin/Debug/x2.jpg
Multi_Client/Multi_Client/bin/Release/Multi_Client.exe
Multi_Client/Multi_Client/bin/Release/Multi_Client.pdb
Multi_Client/Multi_Client/bin/Release/StringTokenizer.dll
Multi_Client/Multi_Client/bin/Release/x2.jpg
Multi_Client/Multi_Client/Multi_Client.cs
Multi_Client/Multi_Client/Multi_Client.csproj
Multi_Client/Multi_Client/Multi_Client.csproj.user
Multi_Client/Multi_Client/Multi_Client.Designer.cs
Multi_Client/Multi_Client/Multi_Client.resx
Multi_Client/Multi_Client/obj/Debug/Multi_Client.csproj.FileListAbsolute.txt
Multi_Client/Multi_Client/obj/Debug/Multi_Client.csproj.GenerateResource.Cache
Multi_Client/Multi_Client/obj/Debug/Multi_Client.exe
Multi_Client/Multi_Client/obj/Debug/Multi_Client.pdb
Multi_Client/Multi_Client/obj/Debug/Refactor/
Multi_Client/Multi_Client/obj/Debug/ResolveAssemblyReference.cache
Multi_Client/Multi_Client/obj/Debug/TempPE/
Multi_Client/Multi_Client/obj/Debug/WindowsFormsApplication1.Multi_Client.resources
Multi_Client/Multi_Client/obj/Debug/WindowsFormsApplication1.Properties.Resources.resources
Multi_Client/Multi_Client/obj/Release/Multi_Client.csproj.FileListAbsolute.txt
Multi_Client/Multi_Client/obj/Release/Multi_Client.csproj.GenerateResource.Cache
Multi_Client/Multi_Client/obj/Release/Multi_Client.exe
Multi_Client/Multi_Client/obj/Release/Multi_Client.pdb
Multi_Client/Multi_Client/obj/Release/TempPE/
Multi_Client/Multi_Client/obj/Release/WindowsFormsApplication1.Multi_Client.resources
Multi_Client/Multi_Client/obj/Release/WindowsFormsApplication1.Properties.Resources.resources
Multi_Client/Multi_Client/Program.cs
Multi_Client/Multi_Client/Properties/AssemblyInfo.cs
Multi_Client/Multi_Client/Properties/Resources.Designer.cs
Multi_Client/Multi_Client/Properties/Resources.resx
Multi_Client/Multi_Client/Properties/Settings.Designer.cs
Multi_Client/Multi_Client/Properties/Settings.settings
Multi_Client/Multi_Client.sln
Multi_Client/Multi_Client.suo
Server/Server/AcceptSocket1.cs
Server/Server/AcceptSocket2.cs
Server/Server/bin/Debug/Server.exe
Server/Server/bin/Debug/Server.pdb
Server/Server/bin/Debug/Server.vshost.exe
Server/Server/bin/Debug/Server.vshost.exe.manifest
Server/Server/bin/Debug/StringTokenizer.dll
Server/Server/bin/Debug/WindowsFormsApplication1.vshost.exe
Server/Server/bin/Debug/WindowsFormsApplication1.vshost.exe.manifest
Server/Server/bin/Debug/x.jpg
Server/Server/bin/Debug/x0.jpg
Server/Server/bin/Release/Server.exe
Server/Server/bin/Release/Server.pdb
Server/Server/bin/Release/StringTokenizer.dll
Server/Server/bin/Release/x.jpg
Server/Server/bin/Release/x0.jpg
Server/Server/ClientHandler1.cs
Server/Server/ClientHandler2.cs
Server/Server/obj/Debug/Refactor/
Server/Server/obj/Debug/ResolveAssemblyReference.cache
Server/Server/obj/Debug/Server.csproj.FileListAbsolute.txt
Server/Server/obj/Debug/Server.csproj.GenerateResource.Cache
Server/Server/obj/Debug/Server.exe
Server/Server/obj/Debug/Server.pdb
Server/Server/obj/Debug/TempPE/
Server/Server/obj/Debug/WindowsFormsApplication1.Properties.Resources.resources
Server/Server/obj/Debug/WindowsFormsApplication1.Server.resources
Server/Server/obj/Release/Server.csproj.FileListAbsolute.txt
Server/Server/obj/Release/Server.csproj.GenerateResource.Cache
Server/Server/obj/Release/Server.exe
Server/Server/obj/Release/Server.pdb
Server/Server/obj/Release/TempPE/
Server/Server/obj/Release/WindowsFormsApplication1.Properties.Resources.resources
Server/Server/obj/Release/WindowsFormsApplication1.Server.resources
Server/Server/Program.cs
Server/Server/Properties/AssemblyInfo.cs
Server/Server/Properties/Resources.Designer.cs
Server/Server/Properties/Resources.resx
Server/Server/Properties/Settings.Designer.cs
Server/Server/Properties/Settings.settings
Server/Server/Server.cs
Server/Server/Server.csproj
Server/Server/Server.csproj.user
Server/Server/Server.Designer.cs
Server/Server/Server.resx
Server/Server/User.cs
Server/Server.sln
Server/Server.suo
Super_Client/Super_Client/bin/Debug/StringTokenizer.dll
Super_Client/Super_Client/bin/Debug/Super_Client.exe
Super_Client/Super_Client/bin/Debug/Super_Client.pdb
Super_Client/Super_Client/bin/Debug/Super_Client.vshost.exe
Super_Client/Super_Client/bin/Debug/Super_Client.vshost.exe.manifest
Super_Client/Super_Client/bin/Debug/test.jpg
Super_Client/Super_Client/bin/Debug/WindowsFormsApplication1.exe
Super_Client/Super_Client/bin/Debug/WindowsFormsApplication1.pdb
Super_Client/Super_Client/bin/Debug/WindowsFormsApplication1.vshost.exe
Super_Client/Super_Client/bin/Debug/x.jpg
Super_Client/Super_Client/bin/Debug/x1.jpg
Super_Client/Super_Client/bin/Release/StringTokenizer.dll
Super_Client/Super_Client/bin/Release/Super_Client.exe
Super_Client/Super_Client/bin/Release/Super_Client.pdb
Super_Client/Super_Client/bin/Release/x.jpg
Super_Client/Super_Client/bin/Release/x1.jpg
Super_Client/Super_Client/obj/Debug/Refactor/
Super_Client/Super_Client/obj/Debug/ResolveAssemblyReference.cache
Super_Client/Super_Client/obj/Debug/Super_Client.csproj.FileListAbsolute.txt
Super_Client/Super_Client/obj/Debug/Super_Client.csproj.GenerateResource.Cache
Super_Client/Super_Client/obj/Debug/Super_Client.exe
Super_Client/Super_Client/obj/Debug/Super_Client.pdb
Super_Client/Super_Client/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll
Super_Client/Super_Client/obj/Debug/WindowsFormsApplication1.csproj.FileListAbsolute.txt
Super_Client/Super_Client/obj/Debug/WindowsFormsApplication1.csproj.GenerateResource.Cache
Super_Client/Super_Client/obj/Debug/WindowsFormsApplication1.exe
Super_Client/Super_Client/obj/Debug/WindowsFormsApplication1.pdb
Super_Client/Super_Client/obj/Debug/WindowsFormsApplication1.Properties.Resources.resources
Super_Client/Super_Client/obj/Debug/WindowsFormsApplication1.Super_Client.resources
Super_Client/Super_Client/obj/Release/Super_Client.csproj.FileListAbsolute.txt
Super_Client/Super_Client/obj/Release/Super_Client.csproj.GenerateResource.Cache
Super_Client/Super_Client/obj/Release/Super_Client.exe
Super_Client/Super_Client/obj/Release/Super_Client.pdb
Super_Client/Super_Client/obj/Release/TempPE/Properties.Resources.Designer.cs.dll
Super_Client/Super_Client/obj/Release/WindowsFormsApplication1.Properties.Resources.resources
Super_Client/Super_Client/obj/Release/WindowsFormsApplication1.Super_Client.resources
Super_Client/Super_Client/Program.cs
Super_Client/Super_Client/Properties/AssemblyInfo.cs
Super_Client/Super_Client/Properties/Resources.Designer.cs
Super_Client/Super_Client/Properties/Resources.resx
Super_Client/Super_Client/Properties/Settings.Designer.cs
Super_Client/Super_Client/Properties/Settings.settings
Super_Client/Super_Client/Super_Client.cs
Super_Client/Super_Client/Super_Client.csproj
Super_Client/Super_Client/Super_Client.csproj.user
Super_Client/Super_Client/Super_Client.Designer.cs
Super_Client/Super_Client/Super_Client.resx
Super_Client/Super_Client.sln
Super_Client/Super_Client.suo
참고 자료
http://youtu.be/uY5O8aM5UsI프로그램소스 연관자료
이 자료와 함께 구매한 자료
소켓통신을 이용한 파일 전송, 검색, 회원가입 13페이지
소켓통신 프로그램(프로세스 모니터링) 25페이지
자바로 만든 메모장 프로그램 0페이지
[컴퓨터네트워크] TCP 파일 전송 프로그램 11페이지
OpenCV 와 TCP 를 활용한 원격영상전송 2페이지