Code Monkey home page Code Monkey logo

gophersharp's Introduction

GopherSharp

GopherSharp is a minimal library to abstract and simplify accessing gopher holes from .NET/Mono. This makes it even more trivial to create a gopher client by abstracting way socket management and parsing menus, leaving basics like displaying and managing the output of the menu up to you.

Documentation

This code can be refractored in minor ways at any time. In addition, more functions may be added.

Check out the gopher RFC as well, for best practices.

Requesting item(s)

To access a menu, use

List<GopherItem> items = GopherRequester.RequestMenu(hostnameToServer, selectorToMenu); // port is last parameter and option, default is 70

To access a text file or menu as a string, use

string item = GopherRequester.RequestText(hostnameToServer, selectorToMenu); // port is last parameter and option, default is 70

To access a raw file as a byte array, use

byte[] item = GopherRequester.RequestRaw(hostnameToServer, selectorToMenu); // port is last parameter and option, default is 70

GopherItem

A GopherItem abstracts a menu item on a gopher server. Its items include:

  • char ItemType - char representing the type of content the selector references
  • string DisplayString - string representing what the item will be on the menu (don't adjust this in your software)
  • string Selector - contains the location of the linked item
  • string Hostname - contains the server name where the linked item lives
  • int Port - port on which the server listens, normally 70

It has a constructor of either nothing (making an empty information item) or consuming a raw string from a gopher menu item.

gophersharp's People

Contributors

nattynarwhal avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  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.