Skip to content

Instantly share code, notes, and snippets.

Sait Sami Kocataş Deliganli

Block or report user

Report or block Deliganli

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View fs2-websocket.scala
import cats.effect.{ConcurrentEffect, ContextShift, Timer}
import com.typesafe.scalalogging.StrictLogging
import fs2.concurrent.Queue
import fs2.{Pipe, Stream}
import io.lemonlabs.uri.AbsoluteUrl
import scodec.Codec
import spinoco.fs2.http.HttpClient
import spinoco.fs2.http.websocket.{Frame, WebSocketRequest}
class WSChannelFactory[F[_]: ConcurrentEffect: ContextShift: Timer](client: HttpClient[F]) {
* Measures given view and runs the action provided after that
* @param view to be measured
* @param action to be performed
public static void measure(View view, ViewMeasurer action) {
ViewTreeObserver vto = view.getViewTreeObserver();
if (vto.isAlive()) {
vto.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
You can’t perform that action at this time.