Giter VIP home page Giter VIP logo

serverproxy's Introduction

ServerProxy

ServerProxy is a Android library to provide easy to use classes to create a local server proxies. The following classes exist:

ServerProxy: abstract class which creates a socket and has methods to get a url to reference it.

  • start: Start the proxy listening for requests
  • stop: Stop the proxy listening for requests
  • getPrivateAddress: Get a local url good for being passed internally to another application on the same device
  • getPublicAddress: Get a url good for being passed to another device on the same LAN

FileProxy: Streams whichever file is referenced in the url. Can handle partial requests.

BufferProxy: Streams a file which is being concurrently downloaded. Takes a BufferProgress object to determine when the file is finished downloading. This is useful for serving a song to a MediaPlayer which is still being downloaded. Can only handle one at a time.

  • setBufferFile: Set the buffer file which is used to query for the state of the download

BufferFile: Interface to be implemented, which is queried to get various information about the file being downloaded

  • getFile: Return the file which is being buffered
  • getContentLength: The content length which is passed as a header. ONLY set if you absolutely know for certain the end size of the file
  • getEstimatedSize: The guessed size of the file. It is used to keep track of how much more data needs to be processed. It should be relatively close.
  • isWorkDone: Whether or not the file is done being downloaded
  • onStart: called when the streaming starts
  • onStop: called when the streaming is done

serverproxy's People

Contributors

daneren2005 avatar mikeyoism avatar nvllsvm avatar sangmingming avatar vrih 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.