Giter Club home page Giter Club logo

socket-programming-finals's Introduction

Socket-Programming-Finals

TCP/IP Socket Programming final assignment

개요

UDP 소켓을 이용한 Mac OS Terminal - Mac iTerm2 간의 채팅 서버 기능을 구현하고자 하였다.

목적

원래는 윈도우와 맥 터미널 간의 채팅 서버를 구현하고자 하였으나 두 OS 간의 차이점과 접근 권한, 버전 등 어려움이 너무 많았고,
이에 따라 올려놓은 코드의 기능을 tKinter (파이썬 GUI) 창을 이용할 수 있도록 구현하고자 하였으나

Screenshot 2021-06-17 at 23 59 14
Screenshot 2021-06-17 at 23 59 28

위와 같이 겉모습은 나오지만

아래와 같은 내용의 에러를 지속적으로 만났고

Screenshot 2021-06-17 at 23 59 34

결국 해결하지 못한 관계로 성공한 코드에 대해서 먼저 설명드리도록 하겠습니다.

위 사진에 보이는 코드는 TkChat_이라는 이름으로 첨부만 하였습니다.

설계 및 기능

두 파이썬 파일을 동시에 터미널에서 실행시키면, 아래 실행 화면처럼 텍스트가 출력됩니다.

이 때 어느 한 쪽에서 메세지를 치면 상대방 쪽에는
FROM ( 상대방 ) : < 메세지 >
형식으로 뜹니다.

이와 같은 방식으로 메세지를 주고받다가, 어느 한 쪽이 q나 Q를 입력하여 접속을 종료할 시에는
상대방 쪽에 ( 상대방 ) WENT OFFLINE 이라는 문구가 뜹니다.

차이점

기존 수업에서 한 클라이언트 사용자의 메세지를 미러링하는 코드와는 달리
해당 코드는 양 쪽에서 서로 메세지를 주고받는 것을 확인할 수 있다.

Screenshot 2021-06-17 at 22 39 33

실행 화면


iTerm2

Screenshot 2021-06-17 at 22 39 55



Terminal

Screenshot 2021-06-17 at 22 40 26

socket-programming-finals's People

Contributors

syngchng avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.